Skip to content

Commit

Permalink
Write nexus version to NXroot
Browse files Browse the repository at this point in the history
  • Loading branch information
domna committed Oct 30, 2023
1 parent 7468544 commit b216afa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pynxtools/dataconverter/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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__

Expand Down

0 comments on commit b216afa

Please sign in to comment.