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 #61322] Tue, 15 July 2008 10:50 Go to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Jul 15, 11:05 am, David Fanning <n...@dfanning.com> wrote:
> julia.waltersp...@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.")

If you want to compare these in a plot you'll probably need to
normalize your time series as this could be different for them all
although I don't know if MODIS has a 0 start of collect time or a zulu
start of collect time, etc...
[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 13:41:52 PDT 2025

Total time taken to generate the page: 0.00403 seconds