diff --git a/pynxtools/dataconverter/readers/xps/config/config_sle_specs.json b/pynxtools/dataconverter/readers/xps/config/config_sle_specs.json index fea7a9077..095bf1e52 100644 --- a/pynxtools/dataconverter/readers/xps/config/config_sle_specs.json +++ b/pynxtools/dataconverter/readers/xps/config/config_sle_specs.json @@ -1,91 +1,113 @@ { -"/ENTRY[entry]/title": "@eln", -"/ENTRY[entry]/start_time": "@eln", -"/ENTRY[entry]/end_time": "@eln", -"/ENTRY[entry]/definition": "@eln", -"/ENTRY[entry]/definition/@version": "@eln", -"/ENTRY[entry]/USER[user]/name": "@eln", -"/ENTRY[entry]/USER[user]/affiliation": "@eln", -"/ENTRY[entry]/USER[user]/address": "@eln", -"/ENTRY[entry]/USER[user]/email": "@eln", -"/ENTRY[entry]/USER[user]/orcid": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/manufacturer": "SPECS GmbH", -"/ENTRY[entry]/INSTRUMENT[instrument]/energy_resolution": "@xps_token:data/step_size", -"/ENTRY[entry]/INSTRUMENT[instrument]/energy_resolution/@units": "eV", -"/ENTRY[entry]/INSTRUMENT[instrument]/work_function": "@xps_token:instrument/workfunction", -"/ENTRY[entry]/INSTRUMENT[instrument]/work_function/@units": "eV", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/type": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/name": "@xps_token:source/name", -"/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/probe": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/distance": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/distance/@units": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_energy": "@xps_token:beam/excitation_energy", -"/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_energy/@units": "eV", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/name": "@xps_token:analyser/name", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/description": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/slow_axes": "energy", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/scheme": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/transmission_function": "@xps_token:collectioncolumn/transmission_function/data", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/transmission_function/@units": "", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/transmission_function/@file": "@xps_token:collectioncolumn/transmission_function/file", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/mode": "@xps_token:collectioncolumn/lens_mode", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L1]/name": "Lens 1", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L1]/voltage": "@xps_token:collectioncolumn/lens1_voltage", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L1]/voltage/@units": "@xps_token:collectioncolumn/lens1_voltage/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L2]/name": "Lens 2", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L2]/voltage": "@xps_token:collectioncolumn/lens2_voltage", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L2]/voltage/@units": "@xps_token:collectioncolumn/lens2_voltage/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[coil]/name": "Coil", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[coil]/current": "@xps_token:collectioncolumn/coil_current", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[coil]/current/@units": "@xps_token:collectioncolumn/coil_current/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl X]/name": "Pre-Deflector X", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl X]/current": "@xps_token:collectioncolumn/pre_deflector_x_current", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl X]/current/@units": "@xps_token:collectioncolumn/pre_deflector_x_current/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl Y]/name": "Pre-Deflector Y", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl Y]/current": "@xps_token:collectioncolumn/pre_deflector_y_current", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl Y]/current/@units": "@xps_token:collectioncolumn/pre_deflector_y_current/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Focus Displacement 1]/name": "Focus Displacement", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Focus Displacement 1]/current": "@xps_token:collectioncolumn/focus_displacement_current", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Focus Displacement 1]/current/@units": "@xps_token:collectioncolumn/focus_displacement_current/@units", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/scheme": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/pass_energy": "@xps_token:energydispersion/pass_energy", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/pass_energy/@units": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/energy_scan_mode": "@xps_token:energydispersion/scan_mode", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/entrance_slit": "@xps_token:energydispersion/entrance_slit", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/exit_slit": "@xps_token:energydispersion/exit_slit", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/iris": "@xps_token:energydispersion/iris_diameter", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/analyzer_radius": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/analyzer_radius/@units": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_type": "channeltron", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/detector_type": "DLD", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/DATA[data]/raw": "@detector_data:cycles/Cycle_", -"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/DATA[data]/raw/@units": "counts", -"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_temperature": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_temperature/@units": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/drain_current": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/drain_current/@units": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_bias": "@eln", -"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_bias/@units": "@eln", -"/ENTRY[entry]/PROCESS[process]/energy_calibration/applied": "true", -"/ENTRY[entry]/PROCESS[process]/energy_calibration/calibration_file": "@xps_token:detector/calibration_file", -"/ENTRY[entry]/PROCESS[process]/intensity_calibration/applied": "true", -"/ENTRY[entry]/PROCESS[process]/intensity_calibration/transmission_function": "@xps_token:collectioncolumn/transmission_function/data", -"/ENTRY[entry]/PROCESS[process]/intensity_calibration/transmission_function/@units": "", -"/ENTRY[entry]/PROCESS[process]/intensity_calibration/transmission_function/@file": "@xps_token:collectioncolumn/transmission_function/file", -"/ENTRY[entry]/SAMPLE[sample]/name": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/chemical_formula": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/preparation_description": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/preparation_date": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/temperature": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/temperature/@units": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/situation": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/gas_pressure": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/gas_pressure/@units": "@eln", -"/ENTRY[entry]/SAMPLE[sample]/description": "@eln", -"/ENTRY[entry]/DATA[data]/@signal": "", -"/ENTRY[entry]/DATA[data]/data": "@data:cycle", -"/ENTRY[entry]/DATA[data]/data/@units": "counts per second", -"/ENTRY[entry]/DATA[data]/energy": "@data:cycle", -"/ENTRY[entry]/DATA[data]/energy/@type": "binding energy", -"/ENTRY[entry]/DATA[data]/energy/@units": "eV" -} \ No newline at end of file + "/ENTRY[entry]/DATA[data]/@signal": "", + "/ENTRY[entry]/DATA[data]/data": "@data:cycle", + "/ENTRY[entry]/DATA[data]/data/@units": "CPS", + "/ENTRY[entry]/DATA[data]/energy": "@data:energy", + "/ENTRY[entry]/DATA[data]/energy/@type": "binding energy", + "/ENTRY[entry]/DATA[data]/energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/distance": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/distance/@units": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_energy": "@xps_token:beam/excitation_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_energy_spread": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_energy_spread/@units": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_polarization": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/BEAM[beam]/incident_polarization/@units": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/contrast_aperture": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/field_aperture": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/mode": "@xps_token:collectioncolumn/lens_mode", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/scheme": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/projection": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/scheme": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/transmission_function": "@xps_token:collectioncolumn/transmission_function/data", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/transmission_function/@units": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/transmission_function/@file": "@xps_token:collectioncolumn/transmission_function/file", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L1]/name": "Lens 1", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L1]/voltage": "@xps_token:collectioncolumn/lens1_voltage", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L1]/voltage/@units": "@xps_token:collectioncolumn/lens1_voltage/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L2]/name": "Lens 2", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L2]/voltage": "@xps_token:collectioncolumn/lens2_voltage", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[L2]/voltage/@units": "@xps_token:collectioncolumn/lens2_voltage/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[coil]/name": "Coil", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[coil]/current": "@xps_token:collectioncolumn/coil_current", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[coil]/current/@units": "@xps_token:collectioncolumn/coil_current/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl X]/name": "Pre-Deflector X", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl X]/current": "@xps_token:collectioncolumn/pre_deflector_x_current", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl X]/current/@units": "@xps_token:collectioncolumn/pre_deflector_x_current/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl Y]/name": "Pre-Deflector Y", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl Y]/current": "@xps_token:collectioncolumn/pre_deflector_y_current", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Pre Defl Y]/current/@units": "@xps_token:collectioncolumn/pre_deflector_y_current/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Focus Displacement 1]/name": "Focus Displacement", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Focus Displacement 1]/current": "@xps_token:collectioncolumn/focus_displacement_current", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/LENS_EM[Focus Displacement 1]/current/@units": "@xps_token:collectioncolumn/focus_displacement_current/@units", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/DATA[data]/@signal": "", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/DATA[data]/raw": "@detector_data:cycles/Cycle_", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/DATA[data]/raw": "counts", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_type": "channeltron", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/detector_type": "DLD", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/energy_scan_mode": "@xps_token:energydispersion/scan_mode", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/entrance_slit": "@xps_token:energydispersion/entrance_slit", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/exit_slit": "@xps_token:energydispersion/exit_slit", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/iris": "@xps_token:energydispersion/iris_diameter", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/analyzer_radius": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/analyzer_radius/@units": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/pass_energy": "@xps_token:energydispersion/pass_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/pass_energy/@units": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/name": "@xps_token:analyser/name", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/description": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/energy_resolution": "@xps_token:data/step_size", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/energy_resolution/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/fast_axes": "None", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/slow_axes": "energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/drain_current": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/drain_current/@units": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_bias": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_bias/@units": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_temperature": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_temperature/@units": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/name": "@xps_token:source/name", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/probe": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/SOURCE[source]/type": "@eln", + "/ENTRY[entry]/INSTRUMENT[instrument]/energy_resolution": "@xps_token:data/step_size", + "/ENTRY[entry]/INSTRUMENT[instrument]/energy_resolution/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/work_function": "@xps_token:instrument/workfunction", + "/ENTRY[entry]/INSTRUMENT[instrument]/work_function/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/manufacturer": "SPECS GmbH", + "/ENTRY[entry]/PROCESS[process]/angular_calibration/applied": "None", + "/ENTRY[entry]/PROCESS[process]/angular_calibration/calibrated_axis": "None", + "/ENTRY[entry]/PROCESS[process]/energy_calibration/applied": true, + "/ENTRY[entry]/PROCESS[process]/energy_calibration/calibration_file": "@xps_token:detector/calibration_file", + "/ENTRY[entry]/PROCESS[process]/energy_calibration/calibrated_axis": "@data:energy", + "/ENTRY[entry]/PROCESS[process]/energy_calibration/calibrated_axis/@units": "eV", + "/ENTRY[entry]/PROCESS[process]/momentum_calibration/applied": false, + "/ENTRY[entry]/PROCESS[process]/momentum_calibration/calibrated_axis": "None", + "/ENTRY[entry]/PROCESS[process]/spatial_calibration/applied": false, + "/ENTRY[entry]/PROCESS[process]/spatial_calibration/calibrated_axis": "None", + "/ENTRY[entry]/PROCESS[process]/intensity_calibration/applied": true, + "/ENTRY[entry]/PROCESS[process]/intensity_calibration/transmission_function": "@xps_token:collectioncolumn/transmission_function/data", + "/ENTRY[entry]/PROCESS[process]/intensity_calibration/transmission_function/@units": "", + "/ENTRY[entry]/PROCESS[process]/intensity_calibration/transmission_function/@file": "@xps_token:collectioncolumn/transmission_function/file", + "/ENTRY[entry]/SAMPLE[sample]/atom_types": "None", + "/ENTRY[entry]/SAMPLE[sample]/bias": "None", + "/ENTRY[entry]/SAMPLE[sample]/bias/@units": "None", + "/ENTRY[entry]/SAMPLE[sample]/chemical_formula": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/gas_pressure": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/gas_pressure/@units": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/name": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/preparation_date": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/preparation_description": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/sample_history": "None", + "/ENTRY[entry]/SAMPLE[sample]/situation": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/temperature": "@eln", + "/ENTRY[entry]/SAMPLE[sample]/temperature/@units": "@eln", + "/ENTRY[entry]/USER[user]/address": "@eln", + "/ENTRY[entry]/USER[user]/affiliation": "@eln", + "/ENTRY[entry]/USER[user]/email": "@eln", + "/ENTRY[entry]/USER[user]/name": "@eln", + "/ENTRY[entry]/USER[user]/orcid": "@eln", + "/ENTRY[entry]/definition": "@eln", + "/ENTRY[entry]/definition/@version": "@eln", + "/ENTRY[entry]/end_time": "@eln", + "/ENTRY[entry]/start_time": "@eln", + "/ENTRY[entry]/title": "@eln" +} diff --git a/pynxtools/dataconverter/readers/xps/sle/sle_specs.py b/pynxtools/dataconverter/readers/xps/sle/sle_specs.py index 808cbbcc5..98c1f43db 100644 --- a/pynxtools/dataconverter/readers/xps/sle/sle_specs.py +++ b/pynxtools/dataconverter/readers/xps/sle/sle_specs.py @@ -210,33 +210,60 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): self._xps_dict[f'{path_map["analyser"]}/name'] = spectrum["devices"][0] self._xps_dict[f'{path_map["source"]}/name'] = spectrum["devices"][1] + # Create keys for writing to data and detector entry = construct_entry_name(region_parent) - self._xps_dict["data"][entry] = xr.Dataset() - scan_key = construct_data_key(spectrum) + detector_data_key_child = construct_detector_data_key(spectrum) energy = np.array(spectrum["data"]["x"]) - channels = [key for key in spectrum["data"] if "cps_ch_" in key] + # If multiple spectra exist to entry, only create a new + # xr.Dataset if the entry occurs for the first time. + if entry not in self._xps_dict["data"]: + self._xps_dict["data"][entry] = xr.Dataset() - for channel in channels: - ch_no = channel.rsplit("_")[-1] - channel_key = f"{scan_key}_chan_{ch_no}" - cps = np.array(spectrum["data"][channel]) + # Write averaged cycle data to 'data'. + all_scan_data = [ + value + for key, value in self._xps_dict["data"][entry].items() + if scan_key.split("_")[0] in key + ] + averaged_scans = np.mean(all_scan_data, axis=0) + if averaged_scans.size == 1: + # on first scan in cycle + averaged_scans = spectrum["data"]["cps_calib"] - self._xps_dict["data"][entry][channel_key] = xr.DataArray( - data=cps, coords={"energy": energy} + try: + self._xps_dict["data"][entry][scan_key.split("_")[0]] = xr.DataArray( + data=averaged_scans, + coords={"energy": energy}, ) + # This error occurs if twice the same region is scanned with + # different step sizes. + except ValueError: + pass + # Write scan data to 'data'. self._xps_dict["data"][entry][scan_key] = xr.DataArray( data=spectrum["data"]["cps_calib"], coords={"energy": energy} ) - detector_data_key_child = construct_detector_data_key(spectrum) - detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' - - self._xps_dict[detector_data_key] = spectrum["data"]["cps_calib"] + channels = [key for key in spectrum["data"] if "cps_ch_" in key] + for channel in channels: + ch_no = channel.rsplit("_")[-1] + channel_key = f"{scan_key}_chan_{ch_no}" + detector_data_key = ( + f"{path_map['detector']}/{detector_data_key_child}" + f"_channels_Channel_{ch_no}/counts" + ) + cps = np.array(spectrum["data"][channel]) + # Write raw data to detector. + self._xps_dict[detector_data_key] = spectrum["data"]["cps_calib"] + # Write channel data to 'data'. + self._xps_dict["data"][entry][channel_key] = xr.DataArray( + data=cps, coords={"energy": energy} + ) class SleProdigyParser(ABC): """ diff --git a/pynxtools/dataconverter/readers/xps/txt/txt_scienta.py b/pynxtools/dataconverter/readers/xps/txt/txt_scienta.py index d6901ce30..3224d94aa 100644 --- a/pynxtools/dataconverter/readers/xps/txt/txt_scienta.py +++ b/pynxtools/dataconverter/readers/xps/txt/txt_scienta.py @@ -166,26 +166,51 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): mpes_key = spectrum_key self._xps_dict[f"{root}/{mpes_key}"] = spectrum[spectrum_key] + # Create keys for writing to data and detector entry = construct_entry_name(region_parent) - self._xps_dict["data"][entry] = xr.Dataset() - scan_key = construct_data_key(spectrum) + detector_data_key_child = construct_detector_data_key(spectrum) + detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' + + # Write raw data to detector. + self._xps_dict[detector_data_key] = spectrum["data"]["y"] + + # If multiple spectra exist to entry, only create a new + # xr.Dataset if the entry occurs for the first time. + if entry not in self._xps_dict["data"]: + self._xps_dict["data"][entry] = xr.Dataset() energy = np.array(spectrum["data"]["x"]) + intensity = spectrum["data"]["y"] - channel_key = f"{scan_key}_chan_0" - self._xps_dict["data"][entry][channel_key] = xr.DataArray( - data=spectrum["data"]["y"], coords={"energy": energy} + # Write to data in order: scan, cycle, channel + + # Write averaged cycle data to 'data'. + all_scan_data = [ + value + for key, value in self._xps_dict["data"][entry].items() + if scan_key.split("_")[0] in key + ] + averaged_scans = np.mean(all_scan_data, axis=0) + if averaged_scans.size == 1: + # on first scan in cycle + averaged_scans = intensity + + self._xps_dict["data"][entry][scan_key.split("_")[0]] = xr.DataArray( + data=averaged_scans, + coords={"energy": energy}, ) + # Write scan data to 'data'. self._xps_dict["data"][entry][scan_key] = xr.DataArray( - data=spectrum["data"]["y"], coords={"energy": energy} + data=intensity, coords={"energy": energy} ) - detector_data_key_child = construct_detector_data_key(spectrum) - detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' - - self._xps_dict[detector_data_key] = spectrum["data"]["y"] + # Write channel data to 'data'. + channel_key = f"{scan_key}_chan_0" + self._xps_dict["data"][entry][channel_key] = xr.DataArray( + data=intensity, coords={"energy": energy} + ) class ScientaTxtHelper: diff --git a/pynxtools/dataconverter/readers/xps/txt/txt_vamas_export.py b/pynxtools/dataconverter/readers/xps/txt/txt_vamas_export.py index 721113391..18307b162 100644 --- a/pynxtools/dataconverter/readers/xps/txt/txt_vamas_export.py +++ b/pynxtools/dataconverter/readers/xps/txt/txt_vamas_export.py @@ -161,21 +161,41 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): except KeyError: pass + # Create keys for writing to data and detector entry = construct_entry_name(region_parent) - self._xps_dict["data"][entry] = xr.Dataset() - scan_key = construct_data_key(spectrum) + detector_data_key_child = construct_detector_data_key(spectrum) + detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' energy = np.array(spectrum["data"]["binding_energy"]) + intensity = np.array(spectrum["data"]["intensity"]) + + # If multiple spectra exist to entry, only create a new + # xr.Dataset if the entry occurs for the first time. + if entry not in self._xps_dict["data"]: + self._xps_dict["data"][entry] = xr.Dataset() + + # Write averaged cycle data to 'data'. + all_scan_data = [ + value + for key, value in self._xps_dict["data"][entry].items() + if scan_key.split("_")[0] in key + ] + averaged_scans = np.mean(all_scan_data, axis=0) + if averaged_scans.size == 1: + # on first scan in cycle + averaged_scans = intensity + + self._xps_dict["data"][entry][scan_key.split("_")[0]] = xr.DataArray( + data=averaged_scans, + coords={"energy": energy}, + ) self._xps_dict["data"][entry][scan_key] = xr.DataArray( - data=spectrum["data"]["intensity"], coords={"energy": energy} + data=intensity, coords={"energy": energy} ) - detector_data_key_child = construct_detector_data_key(spectrum) - detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' - - self._xps_dict[detector_data_key] = spectrum["data"]["intensity"] + self._xps_dict[detector_data_key] = intensity class TextParser(ABC): # pylint: disable=too-few-public-methods diff --git a/pynxtools/dataconverter/readers/xps/vms/vamas.py b/pynxtools/dataconverter/readers/xps/vms/vamas.py index 2066fccb4..56f1b304a 100644 --- a/pynxtools/dataconverter/readers/xps/vms/vamas.py +++ b/pynxtools/dataconverter/readers/xps/vms/vamas.py @@ -22,6 +22,7 @@ from copy import deepcopy import datetime from abc import ABC, abstractmethod +from itertools import groupby import xarray as xr import numpy as np @@ -40,6 +41,9 @@ class VamasMapper(XPSMapper): Class for restructuring .txt data file from Vamas format into python dictionary. """ + + config_file = "config_vms.json" + def __init__(self): self.file = None self.parsers = [ @@ -175,32 +179,51 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): mpes_key = spectrum_key self._xps_dict[f"{root}/{mpes_key}"] = spectrum[spectrum_key] + # Create keys for writing to data and detector entry = construct_entry_name(region_parent) - self._xps_dict["data"][entry] = xr.Dataset() - scan_key = construct_data_key(spectrum) + detector_data_key_child = construct_detector_data_key(spectrum) + detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' energy = np.array(spectrum["data"]["x"]) + intensity = np.array(spectrum["data"]["y"]) - channels = [key for key in spectrum["data"] if "cps_ch_" in key] - - for channel in channels: - ch_no = channel.rsplit("_")[-1] - channel_key = f"{scan_key}_chan_{ch_no}" - cps = np.array(spectrum["data"][channel]) + if entry not in self._xps_dict["data"]: + self._xps_dict["data"][entry] = xr.Dataset() - self._xps_dict["data"][entry][channel_key] = xr.DataArray( - data=cps, coords={"energy": energy} - ) + # Write averaged cycle data to 'data'. + all_scan_data = [ + np.array(value) + for key, value in self._xps_dict["data"][entry].items() + if scan_key.split("_")[0] in key + ] + # Write averaged cycle data to 'data'. + averaged_scans = np.mean(all_scan_data, axis=0) + if averaged_scans.size == 1: + # on first scan in cycle + averaged_scans = intensity + if entry == "3 S1110, UHV, RT, Epass = 30 eV__VB": + self._xps_dict["data"][entry][scan_key.split("_")[0]] = xr.DataArray( + data=averaged_scans, + coords={"energy": energy}, + ) + + try: + self._xps_dict["data"][entry][scan_key.split("_")[0]] = xr.DataArray( + data=averaged_scans, + coords={"energy": energy}, + ) + except ValueError: + pass + + # Write scan data to 'data'. self._xps_dict["data"][entry][scan_key] = xr.DataArray( - data=spectrum["data"]["cps_calib"], coords={"energy": energy} + data=intensity, coords={"energy": energy} ) - detector_data_key_child = construct_detector_data_key(spectrum) - detector_data_key = f'{path_map["detector"]}/{detector_data_key_child}/counts' - - self._xps_dict[detector_data_key] = spectrum["data"]["cps_calib"] + # Write raw intensities to 'detector'. + self._xps_dict[detector_data_key] = intensity class VamasParser(ABC): @@ -471,6 +494,38 @@ def _parse_map_block(self): """ return Block() + def _get_scan_numbers_for_spectra(self, spectra): + """ + For a flat list of spectra, groupby group name and spectrum + type and iteratively give them scan numbers. + + Parameters + ---------- + spectra : list + List of dicts with each dict containing data and metadata + for one spectrum. + + Returns + ------- + flattened_spectra : list + Same list of dicts, but each spectrum gets a scan number. + + """ + + grouped_spectra = [list(y) for x,y in groupby( + sorted(spectra, + key=lambda x: (x['group_name'],x['spectrum_type'])), + lambda x: (x['group_name'],x['spectrum_type']))] + + for group in grouped_spectra: + for i, spectrum in enumerate(group): + spectrum["scan_no"] = i + + flattened_spectra = [spectrum for group in grouped_spectra for spectrum in group] + + return flattened_spectra + + def build_list(self): """ Construct a list of dictionaries from the Vamas objects @@ -568,6 +623,8 @@ def build_list(self): spec_dict.update(settings) spectra += [spec_dict] + spectra = self._get_scan_numbers_for_spectra(spectra) + return spectra diff --git a/pynxtools/dataconverter/readers/xps/xy/xy_specs.py b/pynxtools/dataconverter/readers/xps/xy/xy_specs.py index 7ab257e81..9ace7ed35 100644 --- a/pynxtools/dataconverter/readers/xps/xy/xy_specs.py +++ b/pynxtools/dataconverter/readers/xps/xy/xy_specs.py @@ -47,6 +47,9 @@ class XyMapperSpecs(XPSMapper): Class for restructuring .xy data file from Specs vendor into python dictionary. """ + + config_file = "config_specs_xy.json" + def __init__(self): super().__init__() self.write_channels_to_data = True @@ -183,15 +186,16 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): x_units = spectrum["x_units"] energy = np.array(spectrum["data"]["x"]) + intensity = np.array(spectrum["data"]["y"]) if entry not in self._xps_dict["data"]: self._xps_dict["data"][entry] = xr.Dataset() # Write raw data to detector. - self._xps_dict[detector_data_key] = spectrum["data"]["y"] + self._xps_dict[detector_data_key] = intensity if not self.parser.export_settings["Separate Channel Data"]: - averaged_channels = spectrum["data"]["y"] + averaged_channels = intensity else: all_channel_data = [ value @@ -201,7 +205,7 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): averaged_channels = np.mean(all_channel_data, axis=0) if not self.parser.export_settings["Separate Scan Data"]: - averaged_scans = spectrum["data"]["y"] + averaged_scans = intensity else: all_scan_data = [ value @@ -210,12 +214,15 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): ] averaged_scans = np.mean(all_scan_data, axis=0) - # Writing order: scan, cycle, channel data + # Write to data in order: scan, cycle, channel + + # Write averaged cycle data to 'data'. self._xps_dict["data"][entry][scan_key.split("_")[0]] = xr.DataArray( data=averaged_scans, coords={x_units: energy}, ) if self.parser.export_settings["Separate Scan Data"]: + # Write average cycle data to 'data'. self._xps_dict["data"][entry][scan_key] = xr.DataArray( data=averaged_channels, coords={x_units: energy}, @@ -225,10 +232,11 @@ def _update_xps_dict_with_spectrum(self, spectrum, key_map): self.parser.export_settings["Separate Channel Data"] and self.write_channels_to_data ): + # Write channel data to 'data'. channel_no = spectrum["channel_no"] self._xps_dict["data"][entry][ f"{scan_key}_chan{channel_no}" - ] = xr.DataArray(data=spectrum["data"]["y"], coords={x_units: energy}) + ] = xr.DataArray(data=intensity, coords={x_units: energy}) class XyProdigyParser: # pylint: disable=too-few-public-methods