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

Home » Public Forums » archive » Re: HDF5 data
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
Re: HDF5 data [message #53598] Fri, 20 April 2007 15:27
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
On Apr 20, 3:48 pm, Orion Poplawski <o...@cora.nwra.com> wrote:
> Does anyone know how to read *part* of a dataset stored in an HDF5 file?
>
> Currently we're doing something like:
>
> voltdataset=H5D_OPEN(fn,"RAW11/Data/Samples/Data")
> VoltagesArray=H5D_READ(voltdataset)
>
> But this is a float array of 2,1000,2500,50 and is too big to allocate
> on a 32-bit machine. We'd like to return a subset of the data.
>
> - Orion

The following is based entirely upon reading the IDL HDF5
documentation; I have no personal experience with HDF5 files, only
with HDF4.

You need to use the FILE_SPACE or MEMORY_SPACE arguments to H5D_READ.
These arguments are dataspace identifiers. You have to use the H5S_*
functions to create and manipulate dataspaces. You pass the dimensions
of the offset that you want to H5S_CREATE_SIMPLE(), and pass the
starting position to H5S_OFFSET_SIMPLE. Hopefully you won't need to
create more complicated subsets, but if you do, you can use
H5S_SELECT_HYPERSLAB. Don't forget to call H5S_CLOSE when you're done
with a dataspace.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Probability contour plots
Next Topic: new image in ENVI

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

Current Time: Wed Oct 08 15:10:27 PDT 2025

Total time taken to generate the page: 0.00999 seconds