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

Home » Public Forums » archive » Reading binary data whose source code not given
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
Reading binary data whose source code not given [message #2082] Wed, 18 May 1994 07:25
madabhus is currently offline  madabhus
Messages: 1
Registered: May 1994
Junior Member
Hi. I have the following problem and hope some IDL expert can help me.

I have a binary file with a 400 by 400 array. All I know about the
elements of that array is that they are written as 16-bit 2's complement
data. The file was created on a pc. I am no sure about what language
the software that creates this file is written in (and cannot
find out :-( ).

I am using IDL version 3.0 on a Sun SPARC 10 workstation. I have tried
reading the data onto a 400 by 400 integer array with and without using
the "xdr" keyword (with the "openr" statement). I know that "xdr" was
not used by the file-generating code, but I thought I would try it anyway.
Also, I tried the "/f77_unformatted" keyword, knowing full well that
the file was created on a pc, but I was getting desperate!

None of the above attempts proved successful. (I compared the image plot
with that from an ascii version of the file. The two plots are completely
different. The binary data is read in ok - without any keywords - but none
of the data points are read in correctly.)

So my question is: is there any way to read such data? I would be willing
(and I also tried, but unsuccessfully) to read the data element by element.

Thanks in advance!

------------------------------------------------------------ ----------
-Rajiv

madabhus@eng.umd.edu
madabhus@wam.umd.edu
madabhus@umiacs.umd.edu
------------------------------------------------------------ ----------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Wind Rose
Next Topic: Re: Reading binary data whose source code not given

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

Current Time: Wed Oct 08 13:56:00 PDT 2025

Total time taken to generate the page: 0.00579 seconds