★ Some HDF5 helper routines
posted Fri 27 Jun 2008 by Michael Galloy under IDLI use HDF5 quite a bit and have developed some utility routines, MG_H5_DUMP
(docs, code) and MG_H5_GETDATA
(docs, code), that are quite useful for me.
MG_H5_DUMP
gives similar output to the command line utility h5dump
with -A
set. MG_H5_GETDATA
allows slices of data to be extracted using IDL’s normal indexing rules.
For example,
IDL> f = filepath('hdf5_test.h5', subdir=['examples', 'data'])
IDL> data = mg_h5_getdata(f, '/arrays/3D int array', $
IDL> bounds='3, 5:*:2, 0:49:3'
For more examples, run the main-level programs at the end of the routines:
IDL> .run mg_h5_getdata
IDL> .run mg_h5_dump
August 12th, 2014 at 1:27 pm
[…] for interactive browsing of a dataset and not for efficient, programmatic access. I created a set of routines for dealing with HDF 5 files that I have been extending as needed to other scientific data formats […]