| Re: Would you help me out? data converting problem. [message #12333 is a reply to message #12332] |
Tue, 21 July 1998 00:00  |
Kevin Ivory
Messages: 71 Registered: January 1997
|
Member |
|
|
Jouhahn Lee wrote:
> I have got unformatted raw experiment data obtained from the
The data is not unformatted = binary, it's what IDL calls 'free format'.
> microscope. This is just
> a string form of integer data. The data set was consist of 2048 integer
> ascii numbers.
> What I am trying to do is to make 64 x 32 image from that data file.
> However, I could
> not convert this file to 64x32 image file. I guess there might be quite
> easy solution but
Here is a quick and dirty way of reading the file (no checks for complete
file, data consistency, free logical units, etc.):
image = intarr(64, 32)
openr, 1, /get_lun, 'Aug104.dat'
readf, 1, image
close, 1
Now you have your data in a 64 x 32 integer array and you can do all
the image processing you like. Look into the IDL book 'Building IDL
applications', chapter 'Files and Input/Output' and the book
'Using IDL', chapter 'Image Display Routines'. (The books are
available as PDF files on your installation CD and on RSI's ftp
server.)
Best regards
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Max-Planck-Str. 2 mailto:Kevin.Ivory@linmpi.mpg.de
D-37191 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
|
|
|
|