From b216afa524e6dba5b19bcc65486009bcefc6e588 Mon Sep 17 00:00:00 2001 From: domna Date: Mon, 30 Oct 2023 14:40:35 +0100 Subject: [PATCH] Write nexus version to NXroot --- pynxtools/dataconverter/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pynxtools/dataconverter/helpers.py b/pynxtools/dataconverter/helpers.py index 199dec181..c310aaf09 100644 --- a/pynxtools/dataconverter/helpers.py +++ b/pynxtools/dataconverter/helpers.py @@ -27,6 +27,7 @@ from ase.data import chemical_symbols import h5py +from pynxtools import get_nexus_version from pynxtools.nexus import nexus from pynxtools.nexus.nexus import NxdlAttributeError @@ -591,7 +592,7 @@ def add_default_root_attributes(data, filename): data["/@file_name"] = filename data["/@file_time"] = str(datetime.now(timezone.utc).astimezone()) data["/@file_update_time"] = data["/@file_time"] - data["/@NeXus_version"] = "NOT_IMPLEMENTED" + data["/@NeXus_version"] = get_nexus_version() data["/@HDF5_version"] = '.'.join(map(str, h5py.h5.get_libversion())) # pylint: disable=c-extension-no-member data["/@h5py_version"] = h5py.__version__