diff --git a/pynxtools/dataconverter/readers/xrd/config.py b/pynxtools/dataconverter/readers/xrd/config.py index 6679aa1c3..d9bcca208 100644 --- a/pynxtools/dataconverter/readers/xrd/config.py +++ b/pynxtools/dataconverter/readers/xrd/config.py @@ -1,14 +1,16 @@ """This is config file that mainly maps nexus definition to data path in raw file.""" +# field: {file_exp: {'value': "", +# '@units': ""},} # pylint: disable=C0301 xrdml_1_5 = { "/ENTRY[entry]/2theta_plot/chi": "", - "/ENTRY[entry]/2theta_plot/intensity": "file:/detector", - "/ENTRY[entry]/2theta_plot/omega": "file:/Omega", + "/ENTRY[entry]/2theta_plot/intensity": {"file": ["/detector"]}, + "/ENTRY[entry]/2theta_plot/omega": {"file": ["/Omega"]}, "/ENTRY[entry]/2theta_plot/phi": "", - "/ENTRY[entry]/2theta_plot/two_theta": "file:/2Theta", - "/ENTRY[entry]/COLLECTION[collection]/beam_attenuation_factors": "file:/beamAttenuationFactors", - "/ENTRY[entry]/COLLECTION[collection]/count_time": "file:/countTime", + "/ENTRY[entry]/2theta_plot/two_theta": {"file": ["/2Theta"]}, + "/ENTRY[entry]/COLLECTION[collection]/beam_attenuation_factors": {"file": ["/beamAttenuationFactors"]}, + "/ENTRY[entry]/COLLECTION[collection]/count_time": {"file": ["/countTime"]}, "/ENTRY[entry]/COLLECTION[collection]/count_time/@units": "", "/ENTRY[entry]/COLLECTION[collection]/data_file": "", "/ENTRY[entry]/COLLECTION[collection]/goniometer_x": "file:/X", @@ -44,5 +46,7 @@ "/ENTRY[entry]/definition": "NXxrd_pan", "/ENTRY[entry]/method": "X-Ray Diffraction (XRD)", "/ENTRY[entry]/q_plot/intensity": "file:/detector", - "/ENTRY[entry]/q_plot/q": "" + "/ENTRY[entry]/q_plot/q": "", + "/@default": "entry", + "/ENTRY[entry]/@default": "2theta_plot", } diff --git a/pynxtools/dataconverter/readers/xrd/xrd_helper.py b/pynxtools/dataconverter/readers/xrd/xrd_helper.py index e3e16711b..2e43a09b2 100644 --- a/pynxtools/dataconverter/readers/xrd/xrd_helper.py +++ b/pynxtools/dataconverter/readers/xrd/xrd_helper.py @@ -1,4 +1,5 @@ """XRD helper stuffs.""" + # Copyright The NOMAD Authors. # # This file is part of NOMAD. See https://nomad-lab.eu for further info.