1. HDF5 file format

HDF5 is a hierarchical data format supported by a wide range of programming languages and software platforms. The format is maintained by the The HDF Group.

HDF5 has two primary data structures:

  • HDF5 group, which can contain zero or more groups or datasets

  • HDF5 dataset, which is a multidimensional array of data.

HDF5 groups and datasets are described by metadata given as a list of attributes.

1.1. Using HDF5

The program supports import and export of HDF5 using the File Input and the File Output operations in the post processor or workflow. HDF5 import/export functionality is an efficient way to combine the post processor with external post processing or signal analysis tools.

1.2. The HDF5 exampl

How to run the HDF5 example:

  1. Import the HDF5 example from Help > Examples > Post Processor > HDF5 example.

  2. Run dynamic analysis for the condition set named HDF5 example in the Flex case.

  3. Open the post processor specification.

  4. Right-click the file output filter and export to file.

  5. Right-click the file input filter and import from file.

  6. Open the plot and inspect. Results from the post processor have now been exported to a HDF5-file called flexout.h5 and imported again into the workspace. Both the imported data set and the original data set can be seen in the plot.

image

This is a trivial example of the HDF5 export and import capabilities of the post processor. The user is free to do whatever he/she likes between export and import, as long as the simple structure outlined in the previous section is used when saving data to HDF5 in an external application.

1.3. Getting started with HDF5 in Python

There are (at least) two different APIs for Python; h5py and PyTables. A basic example using h5py is given in hdf5example.py.

1.4. Getting started with HDF5 in Matlab

MATLAB offers a high level and a low level API to HDF5, see HDF5 in Matlab. A basic example using the high level API is given in hdf5example.m.

1.5. Other APIs for HDF5

There are official and third party APIs for several additional programming languages and software platforms, such as C, C, Fortran, Java, R, Octave and Perl. For more information about these and other APIs, see The HDF Group.