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

Home » Public Forums » archive » Re: reading multiple HDF files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: reading multiple HDF files [message #61324 is a reply to message #61322] Tue, 15 July 2008 08:05 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
julia.walterspiel@gmail.com writes:

> In the meantime I did the file_search and read in file by file with a
> for-loop. But I guess this solution does not append the "newly" read
> Variable to the other ones so that I can do a plot of a time series..?

You will probably have to do that yourself. :-)

But, I imagine this array can get pretty big. I think I would
write the files to disk, then read them back in using
the associated variable method (ASSOC) when you need them.

OpenW, outlun, 'mybigfile.dat', /Get_Lun
FOR thisFile = 0, count-1 DO BEGIN
thisImage = HDF_READ(files[thisFile], ....)
WriteU, outlun, thisImage
ENDFOR
Free_Lun, outlun


Then, later:

OpenR, lun, 'mybigfile.dat', /Get_Lun
imageStack = Assoc(lun, IntArr(xsize, ysize))

To display the 4th image:

TV, imageStack[3]

Or, whatever else you want to do with them.

If you want them all, of course:

stack = IntArr(xsize, ysize, count)
OpenR, lun, 'mybigfile.dat', /Get_Lun
ReadU, lun, stack
Free_Lun, lun

Of course, your images might not be integer arrays, and
I have no idea what size these are, etc., etc. Use this
code at your discretion. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Where O Where Di My Pointer Go?
Next Topic: IDLWave opens new frame on error/stop

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

Current Time: Wed Oct 08 17:29:32 PDT 2025

Total time taken to generate the page: 0.00413 seconds