HDF5

From GISAXS
Revision as of 08:32, 5 August 2015 by KevinYager (talk | contribs) (Installation)
Jump to: navigation, search

Hierarchical Data Format (HDF) is a portable binary format, meant to be extensible and self-describing.

Tools

  • hdfview

Reading

In order to read HDF5 files, you will need a suitable library. Here, we describe how to arrange to open compressed HDF5 files in a Python environment.

Installation

  1. Install HDF5 library
    • To install the version from the repository:
      • sudo apt-get install libhdf5-dev
    • In some cases, the repository version may not work (or be out of date). In that case, you can manually download the source from hdfgroup, and install it by doing:
      1. wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.15-patch1.tar.gz
      2. tar xzvf hdf5-1.8.15-patch1.tar.gz
      3. cd hdf5-1.8.15-patch1/
      4. make install
      5. Compilation may take 5-10 minutes. If there are any errors, resolve the dependencies using your package manager.
  2. If necessary, install dependencies:
    1. Cython (C extensions for Python)
      • sudo apt-get install cython
    2. python-pkgconfig:
  3. Install the h5py package (Python library for HDF5).
    1. Download and extract tarball (e.g. from [1]).
    2. Setup
      • cd h5py
      • sudo python setup.py install

See Also