[NeXus-tech] h5ToText.py
Pete R. Jemian
jemian at anl.gov
Wed Jan 19 13:54:40 GMT 2011
This program writes the content and structure of an HDF5 file to stdout.
The format is formatted to best reveal the structure (where things are
stored). It abbreviates large data arrays. There is an option to
specify how much of an array is displayed and it is possible to print no
array data at all.
Here is a test run on the attached example2.hdf5 file
[Pete at como,157,Create]$ wxpython ../h5toText/h5toText.py example2.hdf5
example2.hdf5:NeXus data file
entry:NXentry
@NX_class = NXentry
data:NXdata
@NX_class = NXdata
data --> /entry/exchange/data
positioner_x --> /entry/exchange/positioner_x
positioner_y --> /entry/exchange/positioner_y
exchange:NXexchange
@NX_class = NXexchange
@version = 0.2b
data:NX_INT32[320,240] = __array
@data_type = other
@units = counts
@axes = positioner_x:positioner_y
@signal = 1
@target = /entry/exchange/data
__array = [
[0, 1, 2, '...', 39]
[1, 2, 3, '...', 40]
[2, 3, 4, '...', 41]
...
[19, 20, 21, '...', 8]
]
positioner_x:NX_INT32[320] = __array
@units = degrees
@target = /entry/exchange/positioner_x
__array = [0, 1, 2, '...', 319]
positioner_y:NX_INT32[240] = __array
@units = keV
@target = /entry/exchange/positioner_y
__array = [0, 1, 2, '...', 239]
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <jemian at anl.gov>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: h5toText.py
URL: <http://lists.nexusformat.org/mailman/private/nexus-tech/attachments/20110119/96f41bef/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example2.hdf5
Type: application/octet-stream
Size: 315936 bytes
Desc: not available
URL: <http://lists.nexusformat.org/mailman/private/nexus-tech/attachments/20110119/96f41bef/attachment-0001.obj>
More information about the NeXus-tech
mailing list