hdf5/
mg_h5_getdata.pro
file i/o, hdf5, sdf
includes main-level programExample of pulling out a hyperslab from a variable in an HDF5 file.
Examples
Also, see the main-level program included in this file:
IDL> .run mg_h5_getdata
Routines
result = mg_h5_getdata_convertbounds(sbounds, dimensions=lonarr(ndims))Converts normal IDL indexing notation (represented as a string) into a lonarr(ndims, 3) where the first row is start values, the second row is the end values, and the last row is the stride value.
mg_h5_getdata_computeslab, bounds [, start=lonarr(ndims)] [, count=lonarr(ndims)] [, block=lonarr(ndims)] [, stride=lonarr(ndims)]Compute the H5D_SELECT_HYPERSLAB arguments from the bounds.
result = mg_h5_getdata(filename, variable [, bounds=lonarr(3, ndims)])Pulls out a section of a HDF5 variable.
Routine details
topmg_h5_getdata_convertbounds
result = mg_h5_getdata_convertbounds(sbounds, dimensions=lonarr(ndims))
Converts normal IDL indexing notation (represented as a string) into a lonarr(ndims, 3) where the first row is start values, the second row is the end values, and the last row is the stride value.
Return value
lonarr(ndims, 3)
Parameters
- sbounds in required type=string
-
Keywords
- dimensions in required type=lonarr(ndims)
topmg_h5_getdata_computeslab
mg_h5_getdata_computeslab, bounds [, start=lonarr(ndims)] [, count=lonarr(ndims)] [, block=lonarr(ndims)] [, stride=lonarr(ndims)]
Compute the H5D_SELECT_HYPERSLAB arguments from the bounds.
Parameters
- bounds in required type=lonarr(ndims, 3)
bounds
Keywords
- start out optional type=lonarr(ndims)
input for start argument to H5S_SELECT_HYPERSLAB
- count out optional type=lonarr(ndims)
input for count argument to H5S_SELECT_HYPERSLAB
- block out optional type=lonarr(ndims)
input for block keyword to H5S_SELECT_HYPERSLAB
- stride out optional type=lonarr(ndims)
input for stride keyword to H5S_SELECT_HYPERSLAB
topmg_h5_getdata
result = mg_h5_getdata(filename, variable [, bounds=lonarr(3, ndims)])
Pulls out a section of a HDF5 variable.
Return value
data array
Parameters
- filename in required type=string
filename of the HDF5 file
- variable in required type=string
variable name (with path if inside a group)
Keywords
- bounds in optional type=lonarr(3, ndims)
gives start value, end value, and stride for each dimension of the variable
File attributes
| Modification date: | Fri Jun 27 17:15:32 2008 |
| Lines: | 176 |
| Docformat: | rst rst |
![[attach.png]](../idldoc-resources/attach.png)