comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Byte Swapping
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Byte Swapping [message #37035] Thu, 20 November 2003 11:51
mwatson is currently offline  mwatson
Messages: 2
Registered: November 2003
Junior Member
I have a large set of data that apparently was created on a little
endian platform. I am working on a big endian platform and cannot get
the data to read in correctly. These are my commands:

brr=fltarr(1090,820)
byteorder,brr,/swap_if_big_endian
openr,1,'ndvi0006.d'
readu,1,brr
close,1

and i get this error message:

% READU: End of file encountered. Unit: 1, File: ndvi0006.d
% Execution halted at: $MAIN$

The data is not read correctly and is also very important when I do
convert the data. I should get values in the array from -1 to 1. The
negative values seem to be OK but the positive values are much too
large. The data works fine when it was read on a little endian machine
so that is why I assumed that this is the byte order of the data. Any
help would be greatly appreciated.

-Mike Watson
-Florida State University
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Vector comparison.
Next Topic: Byte Swapping

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:37:17 PDT 2025

Total time taken to generate the page: 0.00511 seconds