Export/Import instrument states to/from the NSX database file
The instrument states are stored in / retrieved from the NSX database under the H5::Group
'DataCollections/dataset-name/Instrument'.
InstrumentStateList
is serialized with the following data:
-
detectorOrientation
(3x3 matrix) -
detectorPositionOffset
(3d vector) -
sampleOrientation
(quaternion) -
sampleOrientationOffset
(quaternion) -
samplePosition
(3d vector) -
ni
(3d row-vector) -
wavelength
(double-typed scalar) -
refined
(bool-typed scalar)
The HDF5 data are stored compactly as 2d tables; e.g., having S states, the set of detectorOrientation
matrices are stored as a single Sx9 table (S rows, 9 columns), where the elements of a each matrix are stored as a single row.
The module core/raw/HDF5TableIO
is added to facilitate reading/writing a 2d table as H5::DataSet
.
Related DataSet keys are added to DataKeys.h
.
Closes issue #398 (closed)
Edited by Ammar Nejati