Difference between revisions of "HDF5"

From GISAXS
Jump to: navigation, search
(Reading)
(Installation)
Line 7: Line 7:
 
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.
 
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===
 
===Installation===
# Install dependencies
+
# Install HDF5 library
#* sudo apt-get install libhdf5-dev
+
#* To install the version from the repository:
#* sudo apt-get install cython
+
#** sudo apt-get install libhdf5-dev
# If necessary, install [https://pypi.python.org/pypi/pkgconfig/1.1.0 python-pkgconfig]:
+
#* In some cases, the repository version may not work (or be out of date). In that case, you can manually download the source from [https://www.hdfgroup.org/HDF5/release/obtainsrc.html#src hdfgroup], and install it by doing:
#* sudo apt-get install python-setuptools
+
#*# wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.15-patch1.tar.gz
#* wget https://pypi.python.org/packages/source/p/pkgconfig/pkgconfig-1.1.0.tar.gz
+
#*# tar xzvf hdf5-1.8.15-patch1.tar.gz
#* cd d pkgconfig-1.1.0/
+
#*# cd hdf5-1.8.15-patch1/
#* python setup.py install
+
#*# make install
 +
# If necessary, install dependencies:
 +
## [http://cython.org/ Cython] (C extensions for Python)
 +
##* sudo apt-get install cython
 +
## [https://pypi.python.org/pypi/pkgconfig/1.1.0 python-pkgconfig]:
 +
##* sudo apt-get install python-setuptools
 +
##* wget https://pypi.python.org/packages/source/p/pkgconfig/pkgconfig-1.1.0.tar.gz
 +
##* cd d pkgconfig-1.1.0/
 +
##* python setup.py install
 
# Install the [http://www.h5py.org/ h5py package] ([[Python]] library for HDF5).
 
# Install the [http://www.h5py.org/ h5py package] ([[Python]] library for HDF5).
 
## Download and extract tarball (e.g. from [https://pypi.python.org/pypi/h5py]).
 
## Download and extract tarball (e.g. from [https://pypi.python.org/pypi/h5py]).

Revision as of 09:31, 5 August 2015

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
  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