Skip to content

Commit

Permalink
Fixing ci for xrd dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Nov 21, 2023
1 parent 72c0b0d commit f2a773b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 44 deletions.
90 changes: 47 additions & 43 deletions pynxtools/dataconverter/readers/xrd/config.py
Original file line number Diff line number Diff line change
@@ -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": ""}
# 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": ""
}
1 change: 0 additions & 1 deletion pynxtools/dataconverter/readers/xrd/xrd_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f2a773b

Please sign in to comment.