Byte Swapping [message #37035] |
Thu, 20 November 2003 11:51 |
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
|
|
|