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

Home » Public Forums » archive » Re: Speed penalty using START and COUNT with HDF_SD_GETDATA
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: Speed penalty using START and COUNT with HDF_SD_GETDATA [message #26537 is a reply to message #26494] Sat, 08 September 2001 08:29 Go to previous message
Bob Fugate is currently offline  Bob Fugate
Messages: 18
Registered: March 2001
Junior Member
> One strategy you might consider is
>
> data = fltarr(32,32,8000)
> for i=0,7999 do begin
> hdf_sd_getdata,arrayid, frame, start=[0,0,i], count=[128,128,1]
> data[*,*,i] = frame[46:77,43:74,0]
> endfor
>
> The motivation for this is that reading data along the final dimension is
> slow in any case (for reasons explained by Reimar) so the loop won't hurt
> you too much. By reading a full frame of data on each step you are reading
> contiguous data, which is fast. And by looping you avoid having to store
> large amounts of unneeded data.
>
> But test it for yourself!
>
> ---
> Mark Hadfield
> m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
> National Institute for Water and Atmospheric Research

Thanks to Mark and Reimar for the suggestions. The SDS's are definitely
dimensioned, so I am not sub-sampling an array having dimensions=[0]. I
have settled on reading the entire 128x128 array and then extracting the
part I need. It turns out that I have enough RAM to read the entire 8000
frames without using a loop as you suggest above, Mark, so the whole
operation is fast.
Thanks again for your help.

Bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: MPEG_SAVE
Next Topic: Re: cmyk colorcoded postscript file

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

Current Time: Sun Oct 12 10:43:40 PDT 2025

Total time taken to generate the page: 1.59847 seconds