From d9977778a11c7e5e4a99aad21568f041cd0d68af Mon Sep 17 00:00:00 2001 From: rettigl Date: Thu, 7 Dec 2023 13:47:00 +0100 Subject: [PATCH] add example notebook --- examples/mpes/NXmpes_phoibos.json | 299 ++++++++++++++++++ ...pyarpes_import_and_kspace_conversion.ipynb | 184 +++++++++++ 2 files changed, 483 insertions(+) create mode 100755 examples/mpes/NXmpes_phoibos.json create mode 100644 examples/mpes/pyarpes_import_and_kspace_conversion.ipynb diff --git a/examples/mpes/NXmpes_phoibos.json b/examples/mpes/NXmpes_phoibos.json new file mode 100755 index 000000000..5498d0b73 --- /dev/null +++ b/examples/mpes/NXmpes_phoibos.json @@ -0,0 +1,299 @@ +{ + "/@default": "entry", + "/ENTRY[entry]/@default": "data", + "/ENTRY[entry]/definition": "NXmpes", + "/ENTRY[entry]/definition/@version": "None", + "/ENTRY[entry]/title": "@attrs:metadata/entry_title", + "/ENTRY[entry]/start_time": "@attrs:metadata/timing/acquisition_start", + "/ENTRY[entry]/experiment_institution": "Fritz Haber Institute - Max Planck Society", + "/ENTRY[entry]/experiment_facility": "Time Resolved ARPES", + "/ENTRY[entry]/experiment_laboratory": "Clean Room 4", + "/ENTRY[entry]/entry_identifier": "@attrs:metadata/loader/scan_path", + "/ENTRY[entry]/end_time": "@attrs:metadata/timing/acquisition_stop", + "/ENTRY[entry]/duration": "@attrs:metadata/timing/acquisition_duration", + "/ENTRY[entry]/duration/@units": "s", + "/ENTRY[entry]/collection_time": "@attrs:metadata/timing/collection_time", + "/ENTRY[entry]/collection_time/@units": "s", + "/ENTRY[entry]/USER[user]/name": "@attrs:metadata/user0/name", + "/ENTRY[entry]/USER[user]/role": "@attrs:metadata/user0/role", + "/ENTRY[entry]/USER[user]/affiliation": "@attrs:metadata/user0/affiliation", + "/ENTRY[entry]/USER[user]/address": "@attrs:metadata/user0/address", + "/ENTRY[entry]/USER[user]/email": "@attrs:metadata/user0/email", + "/ENTRY[entry]/INSTRUMENT[instrument]/name": "Phoibos detector, at the endstation of the high rep-rate HHG source at FHI", + "/ENTRY[entry]/INSTRUMENT[instrument]/name/@short_name": "TR-ARPES @ FHI", + "/ENTRY[entry]/INSTRUMENT[instrument]/angular_resolution": { + "link": "/entry/instrument/electronanalyser/angular_resolution" + }, + "/ENTRY[entry]/geometries/arpesgeometry/depends_on": "/entry/geometries/arpesgeometry/transformations/rot_y", + "/ENTRY[entry]/geometries/arpesgeometry/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@depends_on": ".", + "/ENTRY[entry]/geometries/arpesgeometry/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]": 140.0, + "/ENTRY[entry]/geometries/arpesgeometry/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@transformation_type": "rotation", + "/ENTRY[entry]/geometries/arpesgeometry/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@units": "degrees", + "/ENTRY[entry]/geometries/arpesgeometry/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@vector": [ + 0, + 1, + 0 + ], + "/ENTRY[entry]/INSTRUMENT[instrument]/energy_resolution": "@attrs:metadata/instrument/energy_resolution", + "/ENTRY[entry]/INSTRUMENT[instrument]/energy_resolution/@units": "meV", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/angular_resolution": "@attrs:metadata/instrument/electronanalyser/angular_resolution", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/angular_resolution/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/description": "SPECS Phoibos 150 Hemispherical Energy Analyzer", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/energy_resolution": 110.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/energy_resolution/@units": "meV", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/spatial_resolution": "@attrs:metadata/scan_info/spatial_resolution", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/spatial_resolution/@units": "µm", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/work_function": 4.55, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/work_function/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/fast_axes": "@attrs:metadata/scan_info/fast_axes", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/slow_axes": "@attrs:metadata/scan_info/slow_axes", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/projection": "@attrs:metadata/scan_info/projection", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/scheme": "Angular dispersive", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/mode": "@attrs:metadata/scan_info/LensMode", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/working_distance": 40.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]/working_distance/@units": "mm", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/energy_scan_mode": "@attrs:metadata/scan_info/energy_scan_mode", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/pass_energy": "@attrs:metadata/scan_info/PassEnergy", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/pass_energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/kinetic_energy": "@data:energy.data", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/kinetic_energy/@units": "@data:energy.unit", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/scheme": "hemispherical", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/diameter": 300.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]/diameter/@units": "mm", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_type": "MCP", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/detector_type": "Phosphor+CCD", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/sensor_pixels": [ + 1800, + 1800 + ], + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_bias": "@attrs:metadata/scan_info/ConversionVoltage", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_bias/@units": "V", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_voltage": "@attrs:metadata/scan_info/ScreenVoltage", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/amplifier_voltage/@units": "V", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/detector_voltage": "@attrs:metadata/scan_info/DetectorVoltage", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]/detector_voltage/@units": "V", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/depends_on": "/entry/instrument/electronanalyser/transformations/trans_z", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@depends_on": "analyzer_elevation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]": 40.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@transformation_type": "translation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@units": "mm", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@vector": [0, 0, 1], + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_dispersion/@depends_on": "analyzer_rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_dispersion": "@data:angular1.data", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_dispersion/@transformation_type": "rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_dispersion/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_dispersion/@vector": [1, 0, 0], + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_elevation/@depends_on": "analyzer_dispersion", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_elevation": 0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_elevation/@transformation_type": "rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_elevation/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_elevation/@vector": [0, 1, 0], + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_rotation/@depends_on": "rot_y", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_rotation": 0.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_rotation/@transformation_type": "rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_rotation/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/analyzer_rotation/@vector": [0, 0, 1], + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@depends_on": ".", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]": 140.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@transformation_type": "rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/TRANSFORMATIONS[transformations]/AXISNAME[rot_y]/@vector": [0, 1, 0], + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/name": "HHG @ TR-ARPES @ FHI", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/probe": "ultraviolet", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/type": "HHG laser", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/mode": "Single Bunch", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/frequency": "@attrs:metadata/instrument/beam/probe/frequency", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/frequency/@units": "kHz", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/photon_energy": "@attrs:metadata/instrument/beam/probe/incident_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_probe/photon_energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/distance": 0.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/distance/@units": "mm", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/incident_energy": "@attrs:metadata/instrument/beam/probe/incident_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/incident_energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/incident_energy_spread": "@attrs:metadata/instrument/beam/probe/incident_energy_spread", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/incident_energy_spread/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/pulse_duration": "@attrs:metadata/instrument/beam/probe/pulse_duration", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/pulse_duration/@units": "fs", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/incident_polarization": "@attrs:metadata/instrument/beam/probe/incident_polarization", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/incident_polarization/@units": "V^2/mm^2", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/extent": "@attrs:metadata/instrument/beam/probe/extent", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe/extent/@units": "µm", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/name": "OPCPA @ TR-ARPES @ FHI", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/probe": "visible light", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/type": "Optical Laser", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/mode": "Single Bunch", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/frequency": "@attrs:metadata/instrument/beam/pump/frequency", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/frequency/@units": "kHz", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/photon_energy": "@attrs:metadata/instrument/beam/pump/incident_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/source_pump/photon_energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/distance": 0.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/distance/@units": "mm", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_energy": "@attrs:metadata/instrument/beam/pump/incident_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_energy/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_energy_spread": "@attrs:metadata/instrument/beam/pump/incident_energy_spread", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_energy_spread/@units": "eV", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_wavelength": "@attrs:metadata/instrument/beam/pump/incident_wavelength", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_wavelength/@units": "nm", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/pulse_duration": "@attrs:metadata/instrument/beam/pump/pulse_duration", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/pulse_duration/@units": "fs", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_polarization": "@attrs:metadata/instrument/beam/pump/incident_polarization", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/incident_polarization/@units": "V^2/mm^2", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/pulse_energy": "@attrs:metadata/instrument/beam/pump/pulse_energy", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/pulse_energy/@units": "µJ", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/average_power": "@attrs:metadata/instrument/beam/pump/average_power", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/average_power/@units": "mW", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/extent": "@attrs:metadata/instrument/beam/pump/extent", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/extent/@units": "µm", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/fluence": "@attrs:metadata/instrument/beam/pump/fluence", + "/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump/fluence/@units": "mJ/cm^2", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_temperature": "@attrs:metadata/scan_info/trARPES:Carving:TEMP_RBV", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_temperature/@units": "K", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_bias": 0.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/sample_bias/@units": "V", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/depends_on": "/entry/instrument/manipulator/transformations/trans_z", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@depends_on": "rot_z", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]": -0.32, + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@transformation_type": "translation", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@units": "m", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@vector": [ + 0, + 0, + 1 + ], + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_z]/@depends_on": "rot_x", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_z]": -25.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_z]/@transformation_type": "rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_z]/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_z]/@vector": [ + 0, + 0, + 1 + ], + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_x]/@depends_on": ".", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_x]": -90.0, + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_x]/@transformation_type": "rotation", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_x]/@units": "degrees", + "/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]/TRANSFORMATIONS[transformations]/AXISNAME[rot_x]/@vector": [ + 1, + 0, + 0 + ], + "/ENTRY[entry]/SAMPLE[sample]/preparation_date": "@attrs:metadata/sample/preparation_date", + "/ENTRY[entry]/SAMPLE[sample]/sample_history/description": "@attrs:metadata/sample/sample_history", + "/ENTRY[entry]/SAMPLE[sample]/preparation_description/description": "Here should be a description of the preparation procedure.", + "/ENTRY[entry]/SAMPLE[sample]/chemical_formula": "@attrs:metadata/sample/chemical_formula", + "/ENTRY[entry]/SAMPLE[sample]/description": "@attrs:metadata/sample/chemical_formula", + "/ENTRY[entry]/SAMPLE[sample]/name": "@attrs:metadata/sample/chemical_formula", + "/ENTRY[entry]/SAMPLE[sample]/gas_pressure": "@attrs:metadata/scan_info/trARPES:XGS600:PressureAC:P_RD", + "/ENTRY[entry]/SAMPLE[sample]/gas_pressure/@units": "mbar", + "/ENTRY[entry]/SAMPLE[sample]/situation": "vacuum", + "/ENTRY[entry]/SAMPLE[sample]/temperature": { + "link": "/entry/instrument/manipulator/sample_temperature" + }, + "/ENTRY[entry]/SAMPLE[sample]/bias": { + "link": "/entry/instrument/manipulator/sample_bias" + }, + "/ENTRY[entry]/SAMPLE[sample]/depends_on": "/entry/sample/transformations/corrected_omg", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_omg]/@depends_on": "corrected_phi", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_omg]": 90.0, + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_omg]/@units": "degrees", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_omg]/@transformation_type": "rotation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_omg]/@vector": [ + 0, + 0, + 1 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_phi]/@depends_on": "rot_omg", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_phi]": 90.0, + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_phi]/@units": "degrees", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_phi]/@transformation_type": "rotation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[corrected_phi]/@vector": [ + 0, + 1, + 0 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_omg]/@depends_on": "rot_phi", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_omg]": "@attrs:metadata/scan_info/trARPES:Carving:OMG.RBV", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_omg]/@units": "degrees", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_omg]/@transformation_type": "rotation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_omg]/@vector": [ + 1, + 0, + 0 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_phi]/@depends_on": "rot_tht", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_phi]": "@attrs:metadata/scan_info/trARPES:Carving:PHI.RBV", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_phi]/@units": "degrees", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_phi]/@transformation_type": "rotation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_phi]/@vector": [ + 0, + 1, + 0 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_tht]/@depends_on": "tht_offset", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_tht]": "@attrs:metadata/scan_info/trARPES:Carving:THT.RBV", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_tht]/@units": "degrees", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_tht]/@transformation_type": "rotation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[rot_tht]/@vector": [ + 0, + 0, + 1 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[tht_offset]/@depends_on": "trans_z", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[tht_offset]": -17, + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[tht_offset]/@units": "degrees", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[tht_offset]/@transformation_type": "rotation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[tht_offset]/@vector": [ + 0, + 0, + 1 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@depends_on": "trans_y", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]": "@attrs:metadata/scan_info/trARPES:Carving:TRZ.RBV", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@units": "mm", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@transformation_type": "translation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_z]/@vector": [ + 0, + 0, + 1 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_y]/@depends_on": "trans_x", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_y]": "@attrs:metadata/scan_info/trARPES:Carving:TRY.RBV", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_y]/@units": "mm", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_y]/@transformation_type": "translation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_y]/@vector": [ + 0, + 1, + 0 + ], + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_x]/@depends_on": "/entry/instrument/manipulator/transformations/trans_z", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_x]": "@attrs:metadata/scan_info/trARPES:Carving:TRX.RBV", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_x]/@units": "mm", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_x]/@transformation_type": "translation", + "/ENTRY[entry]/SAMPLE[sample]/TRANSFORMATIONS[transformations]/AXISNAME[trans_x]/@vector": [ + 1, + 0, + 0 + ], + "/ENTRY[entry]/PROCESS[process]/energy_calibration/applied": true, + "/ENTRY[entry]/PROCESS[process]/energy_calibration/calibrated_axis": "@data:energy.data", + "/ENTRY[entry]/PROCESS[process]/angular1_calibration/applied": true, + "/ENTRY[entry]/PROCESS[process]/angular1_calibration/calibrated_axis": "@data:angular1.data", + "/ENTRY[entry]/DATA[data]/@axes": "@data:dims", + "/ENTRY[entry]/DATA[data]/@angular1_indices": "@data:angular1.index", + "/ENTRY[entry]/DATA[data]/@energy_indices": "@data:energy.index", + "/ENTRY[entry]/DATA[data]/@angular2_indices": "@data:angular2.index", + "/ENTRY[entry]/DATA[data]/AXISNAME_indices[@*_indices]": "@data:*.index", + "/ENTRY[entry]/DATA[data]/@*_depends": "@attrs:metadata/scan_info/coordinate_depends/*", + "/ENTRY[entry]/DATA[data]/@signal": "data", + "/ENTRY[entry]/DATA[data]/data": "@data:data", + "/ENTRY[entry]/DATA[data]/data/@units": "counts", + "/ENTRY[entry]/DATA[data]/angular1": "@data:angular1.data", + "/ENTRY[entry]/DATA[data]/angular1/@units": "@data:angular1.unit", + "/ENTRY[entry]/DATA[data]/energy": "@data:energy.data", + "/ENTRY[entry]/DATA[data]/energy/@units": "@data:energy.unit", + "/ENTRY[entry]/DATA[data]/angular2": "@data:angular2.data", + "/ENTRY[entry]/DATA[data]/angular2/@units": "@data:angular2.unit", + "/ENTRY[entry]/DATA[data]/AXISNAME[*]": "@data:*.data", + "/ENTRY[entry]/DATA[data]/AXISNAME[*]/@units": "@data:*.unit" +} diff --git a/examples/mpes/pyarpes_import_and_kspace_conversion.ipynb b/examples/mpes/pyarpes_import_and_kspace_conversion.ipynb new file mode 100644 index 000000000..2429b1a0a --- /dev/null +++ b/examples/mpes/pyarpes_import_and_kspace_conversion.ipynb @@ -0,0 +1,184 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## This is an example showcasing the conversion of angle-mapped ARPES data into momentum space using pyarpes\n", + "The band dispersion is loaded from an hdf5 format and converted into the [NeXus format](https://manual.nexusformat.org/classes/contributed_definitions/NXmpes_arpes.html#nxmpes_arpes) using the [Nomad Parser Nexus](https://github.com/nomad-coe/nomad-parser-nexus).\n", + "Subsequently, the converted NeXus file is imported into pyarpes, and the Fermi Surface is converted into momentum space." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Import all required modules" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "#%load_ext autoreload\n", + "#%autoreload 2\n", + "from pynxtools.dataconverter.convert import convert\n", + "from arpes.io import load_data\n", + "from arpes.endstations.plugin.nexus import NeXusEndstation\n", + "from arpes.utilities.conversion import convert_to_kspace\n", + "import numpy as np" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Convert the file into the NeXus format using the pynxtools data converter" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "convert(nxdl=\"NXmpes_arpes\", reader=\"mpes\", output=\"FS_map_TbTe3.nxs\", input_file=(\"FS_map_TbTe3.h5\", \"NXmpes_phoibos.json\"))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Load into pyarpes with the NeXusEndstation loader" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "FS_map_TbTe3 = load_data(\"FS_map_TbTe3.nxs\", location=NeXusEndstation)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "shift energy axis by photon energy" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "FS_map_TbTe3_shifted = FS_map_TbTe3\n", + "FS_map_TbTe3_shifted['eV'] = FS_map_TbTe3_shifted['eV'] - FS_map_TbTe3.attrs[\"hv\"].magnitude" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Inspect resulting dataset" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "FS_map_TbTe3_shifted" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Extract Fermi surface" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# map 1 eV below EF\n", + "fsmap = FS_map_TbTe3_shifted.S.generic_fermi_surface(0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Convert into momentum space" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "\n", + "converted = convert_to_kspace(\n", + " fsmap, # just convert the Fermi surface\n", + " kx=np.linspace(-.5, .5, 200), # along -2.5 <= kx < 1.5 (inv ang.)\n", + " # with 400 steps\n", + " ky=np.linspace(-1.1, 1.1, 400), # as above, with -2 <= ky < 2\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "converted.T.plot()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.12" + }, + "vscode": { + "interpreter": { + "hash": "a164666994e9db75450cd7016dd7e51d42ea6e7c1e5e8017af1f8068ca906367" + } + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}