From f2a773b03ff77c1240a66819aa437a5fd015fb0f Mon Sep 17 00:00:00 2001 From: Rubel Date: Tue, 21 Nov 2023 10:36:19 +0100 Subject: [PATCH] Fixing ci for xrd dir. --- pynxtools/dataconverter/readers/xrd/config.py | 90 ++++++++++--------- .../dataconverter/readers/xrd/xrd_helper.py | 1 - 2 files changed, 47 insertions(+), 44 deletions(-) diff --git a/pynxtools/dataconverter/readers/xrd/config.py b/pynxtools/dataconverter/readers/xrd/config.py index 16b1d5813..6679aa1c3 100644 --- a/pynxtools/dataconverter/readers/xrd/config.py +++ b/pynxtools/dataconverter/readers/xrd/config.py @@ -1,44 +1,48 @@ +"""This is config file that mainly maps nexus definition to data path in raw file.""" -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/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]/COLLECTION[collection]/count_time/@units": "", -"/ENTRY[entry]/COLLECTION[collection]/data_file": "", -"/ENTRY[entry]/COLLECTION[collection]/goniometer_x": "file:/X", -"/ENTRY[entry]/COLLECTION[collection]/goniometer_x/@units": "", -"/ENTRY[entry]/COLLECTION[collection]/goniometer_y": "file:/Y", -"/ENTRY[entry]/COLLECTION[collection]/goniometer_y/@units": "", -"/ENTRY[entry]/COLLECTION[collection]/goniometer_z": "file:/Z", -"/ENTRY[entry]/COLLECTION[collection]/goniometer_z/@units": "", -"/ENTRY[entry]/COLLECTION[collection]/measurement_type": "file:/xrdMeasurements/xrdMeasurement/measurementType", -"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/integration_time": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/integration_time/@units": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_axis": "file:/xrdMeasurements/xrdMeasurement/scan/scanAxis", -"/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_mode": "file:/xrdMeasurements/xrdMeasurement/scan/mode", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one" : "file:/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha1", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one/@units" : "file:/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha1/unit", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two": "file:/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha2", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two/@units": "file:/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/kbeta": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/kbeta/@units": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone/@units": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current" : "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/current", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current/@units":"", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/source_peak_wavelength" : "", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/source_peak_wavelength/@units": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_material": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/anodeMaterial", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/tension", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage/@units": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/tension/unit", -"/ENTRY[entry]/SAMPLE[sample]/prepared_by": "", -"/ENTRY[entry]/SAMPLE[sample]/sample_id": "", -"/ENTRY[entry]/SAMPLE[sample]/sample_mode": "", -"/ENTRY[entry]/SAMPLE[sample]/sample_name": "", -"/ENTRY[entry]/definition": "NXxrd_pan", -"/ENTRY[entry]/method": "X-Ray Diffraction (XRD)", -"/ENTRY[entry]/q_plot/intensity": "file:/detector", -"/ENTRY[entry]/q_plot/q": ""} \ No newline at end of file +# 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/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]/COLLECTION[collection]/count_time/@units": "", + "/ENTRY[entry]/COLLECTION[collection]/data_file": "", + "/ENTRY[entry]/COLLECTION[collection]/goniometer_x": "file:/X", + "/ENTRY[entry]/COLLECTION[collection]/goniometer_x/@units": "", + "/ENTRY[entry]/COLLECTION[collection]/goniometer_y": "file:/Y", + "/ENTRY[entry]/COLLECTION[collection]/goniometer_y/@units": "", + "/ENTRY[entry]/COLLECTION[collection]/goniometer_z": "file:/Z", + "/ENTRY[entry]/COLLECTION[collection]/goniometer_z/@units": "", + "/ENTRY[entry]/COLLECTION[collection]/measurement_type": "file:/xrdMeasurements/xrdMeasurement/measurementType", + "/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/integration_time": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/integration_time/@units": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_axis": "file:/xrdMeasurements/xrdMeasurement/scan/scanAxis", + "/ENTRY[entry]/INSTRUMENT[instrument]/DETECTOR[detector]/scan_mode": "file:/xrdMeasurements/xrdMeasurement/scan/mode", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one": "file:/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha1", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_one/@units": "file:/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha1/unit", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two": "file:/xrdMeasurements/xrdMeasurement/usedWavelength/kAlpha2", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two/@units": "file:/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/k_alpha_two/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/kbeta": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/kbeta/@units": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/ratio_k_alphatwo_k_alphaone/@units": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/current", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_current/@units": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/source_peak_wavelength": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/source_peak_wavelength/@units": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_material": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/anodeMaterial", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/tension", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/xray_tube_voltage/@units": "file:/xrdMeasurements/xrdMeasurement/incidentBeamPath/xRayTube/tension/unit", + "/ENTRY[entry]/SAMPLE[sample]/prepared_by": "", + "/ENTRY[entry]/SAMPLE[sample]/sample_id": "", + "/ENTRY[entry]/SAMPLE[sample]/sample_mode": "", + "/ENTRY[entry]/SAMPLE[sample]/sample_name": "", + "/ENTRY[entry]/definition": "NXxrd_pan", + "/ENTRY[entry]/method": "X-Ray Diffraction (XRD)", + "/ENTRY[entry]/q_plot/intensity": "file:/detector", + "/ENTRY[entry]/q_plot/q": "" +} diff --git a/pynxtools/dataconverter/readers/xrd/xrd_helper.py b/pynxtools/dataconverter/readers/xrd/xrd_helper.py index 636c1056d..e3e16711b 100644 --- a/pynxtools/dataconverter/readers/xrd/xrd_helper.py +++ b/pynxtools/dataconverter/readers/xrd/xrd_helper.py @@ -34,7 +34,6 @@ def get_a_value_or_warn(return_value="", return return_value - # pylint: disable=R0914, R0915, W0613 def feed_xrdml_to_template(template, xrd_dict, eln_dict, config_dict=None): """Fill template with data from xrdml type file.