Commit 6ec9a5b8 authored by payno's avatar payno
Browse files

[converter-hdf5] Add NXdata management.

parent e889f7a7
Pipeline #37766 failed with stages
in 17 seconds
......@@ -1590,10 +1590,11 @@ class _StandardBaseAcquisition(_BaseAcquisition):
def _write_instrument(self, root_node):
instrument_node = root_node.create_group("instrument")
instrument_node.attrs["NX_class"] = u"NXinstrument"
instrument_node.attrs["NX_class"] = "NXinstrument"
instrument_node.attrs["default"] = "detector"
detector_node = instrument_node.create_group("detector")
detector_node.attrs["NX_class"] = u"NXdetector"
detector_node.attrs["NX_class"] = "NXdetector"
# write data
if self._virtual_sources is not None:
self._create_data_virtual_dataset(detector_node)
......@@ -1661,7 +1662,9 @@ class _StandardBaseAcquisition(_BaseAcquisition):
last += vs_len
detector_node.create_virtual_dataset("data", layout)
detector_node["data"].attrs["interpretation"] = u"image"
detector_node.attrs["NX_class"] = "NXdata"
detector_node.attrs["signal"] = "data"
detector_node["data"].attrs["interpretation"] = "image"
def _check_has_metadata(self):
if self._initialization_entry is None:
......@@ -1888,6 +1891,8 @@ class _StandardBaseAcquisition(_BaseAcquisition):
entry.attrs["NX_class"] = u"NXentry"
entry.attrs["definition"] = u"NXtomo"
entry.attrs["version"] = CURRENT_OUTPUT_VERSION
entry.attrs["default"] = "instrument/detector"
self._write_beam(
entry, request_input=request_input, input_callback=input_callback
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment