EasyManua.ls Logo

Dectris EIGER 2 - Writing Data; Third Party HDF5 Libraries

Dectris EIGER 2
41 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
10.2.3. Writing Data
[]$_ Example ALBULA
### write the (uncompressed) images and the neXus header to a new HDF5 file ###
HDF5Writer = albula.DHdf5Writer("testContainer.h5",1000, neXusHeader)
for i in range(h5cont.first(), h5cont.last() + 1):
img = h5cont[i]
HDF5Writer.write(img)
### flushing closes the master and the data files ###
HDF5Writer.flush()
### write the images in the cbf format. Careful: Information from the header will be lost!
###
for i in range(h5cont.first(), h5cont.last() + 1):
img = h5cont[i]
albula.DImageWriter.write(img, "testImage_{0:05d}.cbf".format(i))
### write the images in the tif format. Careful: Information from the header will be lost!
###
for i in range(h5cont.first(), h5cont.last() + 1):
img = h5cont[i]
albula.DImageWriter.write(img, "testImage_{0:05d}.tif".format(i))
10.3. Third Party HDF5 Libraries
The EIGER2 HDF5 data can also be directly read with programs using the HDF5 library. By default the EIGER2
data is compressed using the BSLZ4
2
algorithm. In order to decompress the data, the HDF5 plug-in lter
3
can be used, see github.com/nexusformat/HDF5-External-Filter-Plugins. By setting the environment variable
HDF5_PLUGIN_PATH to the path where the compiled plug-in lter can be found, the HDF5 library will decom-
press the data compressed with LZ4 by itself. If you want to use proprietary software like Matlab, IDL or similar,
make sure that the HDF5 library version used by this software is at least v1.8.11 in order for the plug-in mech-
anism to work.
For developers using C++, example code can be found on the DECTRIS
®
website
, after registration and login.
2
See: https://code.google.com/p/lz4/, https://github.com/kiyo-masui/bitshue
3
In order to use the lter plug-in mechanism, HDF5 v1.8.11 or greater must be used. See also
http://www.hdfgroup.org/HDF5/doc/Advanced/DynamicallyLoadedFilters/HDF5DynamicallyLoadedFilters.pdf
DECTRIS EIGER
®
2 User Manual v1.8.2 32 | 36

Table of Contents