Skip to content

Commit

Permalink
Merge pull request #74 from FAIRmat-NFDI/use-multiformat-reader
Browse files Browse the repository at this point in the history
Use multiformat reader
  • Loading branch information
lukaspie authored Aug 12, 2024
2 parents b074d3a + a4e77d7 commit 266d7ac
Show file tree
Hide file tree
Showing 65 changed files with 1,813 additions and 1,912 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Install dev requirements
run: |
uv pip install -r dev-requirements.txt
- name: ruff
- name: ruff check
run: |
ruff src/pynxtools_xps tests
- name: ruff formatting
ruff check src/pynxtools_xps tests
- name: ruff format
run: |
ruff format --check src/pynxtools_xps tests
- name: mypy
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.8
rev: v0.5.5
hooks:
# Run the linter.
- id: ruff
Expand Down
8 changes: 3 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pymdown-extensions==10.8.1
# via
# pynxtools-xps (pyproject.toml)
# mkdocs-material
pynxtools==0.3.2
pynxtools==0.6.0
# via pynxtools-xps (pyproject.toml)
pyparsing==3.1.1
# via matplotlib
Expand Down Expand Up @@ -192,14 +192,12 @@ regex==2024.4.28
# via mkdocs-material
requests==2.31.0
# via mkdocs-material
ruff==0.4.8
ruff==0.5.5
# via pynxtools-xps (pyproject.toml)
scipy==1.9.1
# via ase
setuptools==70.0.0
# via
# pynxtools-xps (pyproject.toml)
# nodeenv
# via nodeenv
six==1.16.0
# via
# anytree
Expand Down
44 changes: 22 additions & 22 deletions examples/coordinate_system/config_vms_cs_fixed.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"/ENTRY[entry]/geometries":{
"/ENTRY/geometries":{
"COORDINATE_SYSTEM[xps_coordinate_system]":{
"origin":"sample stage",
"handedness":"left_handed",
"z_direction":"sample stage normal",
"depends_on": "/entry/geometries/xps_coordinate_system/coordinate_transformations/z_rotation",
"x": [-1, 0 , 0],
"y": [0, 1, 0],
"z": [0, 0 , 1],
"TRANSFORMATIONS[coordinate_transformations]": {
"depends_on":"/entry/geometries/xps_coordinate_system/coordinate_transformations/z_rotation",
"x":[-1, 0 , 0],
"y":[0, 1, 0],
"z":[0, 0 , 1],
"TRANSFORMATIONS[coordinate_transformations]":{
"AXISNAME[z_rotation]":150.0,
"AXISNAME[z_rotation]/@units":"degree",
"AXISNAME[z_rotation]/@transformation_type": "rotation",
"AXISNAME[z_rotation]/@vector": [0, 0, 1],
"AXISNAME[z_rotation]/@transformation_type":"rotation",
"AXISNAME[z_rotation]/@vector":[0, 0, 1],
"AXISNAME[z_rotation]/@depends_on":"y_flip",

"AXISNAME[y_flip]":180.0,
"AXISNAME[y_flip]/@units":"degree",
"AXISNAME[y_flip]/@transformation_type": "rotation",
"AXISNAME[y_flip]/@vector": [0, 1, 0],
"AXISNAME[y_flip]/@transformation_type":"rotation",
"AXISNAME[y_flip]/@vector":[0, 1, 0],
"AXISNAME[y_flip]/@depends_on":"y_rotation",

"AXISNAME[y_rotation]":54.5,
"AXISNAME[y_rotation]/@units":"degree",
"AXISNAME[y_rotation]/@transformation_type": "rotation",
"AXISNAME[y_rotation]/@vector": [0, -1, 0],
"AXISNAME[y_rotation]/@transformation_type":"rotation",
"AXISNAME[y_rotation]/@vector":[0, -1, 0],
"AXISNAME[y_rotation]/@depends_on":"."
}
}
},
"/ENTRY[entry]/INSTRUMENT[instrument]":{
"/ENTRY/INSTRUMENT[instrument]":{
"beamTYPE[beam_xray]":{
"depends_on": "/entry/instrument/beam_xray/transformations/beam_polar_angle_of_incidence",
"TRANSFORMATIONS[transformations]": {
"depends_on":"/entry/instrument/beam_xray/transformations/beam_polar_angle_of_incidence",
"TRANSFORMATIONS[transformations]":{
"AXISNAME[beam_polar_angle_of_incidence]":54.5,
"AXISNAME[beam_polar_angle_of_incidence]/@units":"degree",
"AXISNAME[beam_polar_angle_of_incidence]/@transformation_type":"rotation",
Expand All @@ -42,13 +42,13 @@
"AXISNAME[beam_azimuth_angle]":150.0,
"AXISNAME[beam_azimuth_angle]/@units":"degree",
"AXISNAME[beam_azimuth_angle]/@transformation_type":"rotation",
"AXISNAME[beam_azimuth_angle]/@vector": [0, 0, -1],
"AXISNAME[beam_azimuth_angle]/@vector":[0, 0, -1],
"AXISNAME[beam_azimuth_angle]/@depends_on":"/entry/geometries/xps_coordinate_system/coordinate_transformations/z_rotation"
}
},
},
"ELECTRONANALYSER[electronanalyser]":{
"depends_on":"/entry/instrument/electronanalyser/transformations/analyser_take_off_polar_angle",
"TRANSFORMATIONS[transformations]": {
"TRANSFORMATIONS[transformations]":{
"AXISNAME[analyser_take_off_polar_angle]":0.0,
"AXISNAME[analyser_take_off_polar_angle]/@units":"degree",
"AXISNAME[analyser_take_off_polar_angle]/@transformation_type":"rotation",
Expand All @@ -62,13 +62,13 @@
"AXISNAME[analyser_take_off_azimuth_angle]/@depends_on":"/entry/geometries/xps_coordinate_system/coordinate_transformations/z_rotation"
}
}
},
"/ENTRY[entry]/SAMPLE[sample]":{
},
"/ENTRY/SAMPLE[sample]":{
"depends_on":"/entry/sample/transformations/sample_rotation_angle",
"TRANSFORMATIONS[transformations]": {
"TRANSFORMATIONS[transformations]":{
"AXISNAME[sample_rotation_angle]":50.0,
"AXISNAME[sample_rotation_angle]/@units":"degree",
"AXISNAME[sample_rotation_angle]/@transformation_type": "rotation",
"AXISNAME[sample_rotation_angle]/@transformation_type":"rotation",
"AXISNAME[sample_rotation_angle]/@vector":[0, 0, -1],
"AXISNAME[sample_rotation_angle]/@depends_on":"sample_normal_tilt_azimuth_angle",

Expand Down
Binary file added examples/phi/SnO2_10nm.pro.nxs
Binary file not shown.
Binary file modified examples/phi/SnO2_10nm.spe.nxs
Binary file not shown.
Binary file modified examples/phi/SnO2_10nm_1.pro.nxs
Binary file not shown.
8 changes: 4 additions & 4 deletions examples/phi/eln_data_phi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ experiment_laboratory: XPS Lab
user:
name: Sebastian Benz
affiliation: Justus-Liebig-Universität Gießen, AG Spektroskopie und Optik
orcid: null
email: null
IDENTIFIER[orcid]: null
instrument:
energy_resolution:
type: calibrated
Expand All @@ -15,6 +15,7 @@ instrument:
unit: eV
source_xray:
type: Fixed Tube X-ray
name: VersaProbe 4 X-ray Source
probe: photon
device_information:
vendor: PHI Electronics
Expand Down Expand Up @@ -52,7 +53,7 @@ instrument:
identifier: null
energydispersion:
scheme: hemispherical
diameter:
radius:
unit: mm
value: 150
device_information:
Expand Down Expand Up @@ -144,7 +145,6 @@ instrument:
sample:
name: SnO2 10nnm
sample_id: 1
atom_types: Sn, O
physical_form: pellet
situation: vacuum
substance:
Expand All @@ -164,4 +164,4 @@ sample:
start_time: 2022-01-22T12:30:00.200Z
end_time: 2022-01-22T12:31:00.200Z
description: loaded into the VersaProbe 4
method: vacuum transfer
method: vacuum transfer
Binary file modified examples/scienta/ibw/Cu-HHTP.ibw.nxs
Binary file not shown.
15 changes: 5 additions & 10 deletions examples/scienta/ibw/eln_data_scienta_ibw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ user:
email: [email protected]
affiliation: Karlsruhe Institute of Technology (KIT), Institut für Funktionelle Grenzflächen
address: KIT
orcid: 0000-0001-9361-8333
instrument:
energy_resolution:
type: calibrated
Expand Down Expand Up @@ -140,25 +139,21 @@ instrument:
value:
value: 0.000000001
unit: mbar
value_log:
value:
value: null
unit: null
flood_gun:
name: FG 22/35
physical_quantity: current
type: low energy electron source
current:
value: 0.0
unit: A
current_log:
value:
value: null
unit: null
sample:
chemical_formula: Cu
sample_id: 1
description: Cu-HHTP/Glass on standard sample holder
physical_form: pellet
situation: vacuum
substance:
name: Cu
molecular_formula_hill: Cu
history:
sample_preparation:
start_time: 2022-04-08T11:25:00.200Z
Expand Down
Binary file modified examples/scienta/txt/Cu-HHTP.txt.nxs
Binary file not shown.
15 changes: 5 additions & 10 deletions examples/scienta/txt/eln_data_scienta_txt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ user:
email: [email protected]
affiliation: Karlsruhe Institute of Technology (KIT), Institut für Funktionelle Grenzflächen
address: KIT
orcid: 0000-0001-9361-8333
instrument:
energy_resolution:
type: calibrated
Expand Down Expand Up @@ -140,25 +139,21 @@ instrument:
value:
value: 0.000000001
unit: mbar
value_log:
value:
value: null
unit: null
flood_gun:
name: FG 22/35
physical_quantity: current
type: low energy electron source
current:
value: 0.0
unit: A
current_log:
value:
value: null
unit: null
sample:
chemical_formula: Cu
sample_id: 1
description: Cu-HHTP/Glass on standard sample holder
physical_form: pellet
situation: vacuum
substance:
name: Cu
molecular_formula_hill: Cu
history:
sample_preparation:
start_time: 2022-04-08T11:25:00.200Z
Expand Down
Binary file modified examples/specs/sle/Au_25_mbar_O2_no_align.nxs
Binary file not shown.
5 changes: 2 additions & 3 deletions examples/specs/sle/eln_data_sle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ program_name: SpecsLabProdigy
user:
name: Lukas Pielsticker
affiliation: Max Planck Institute for Chemical Energy Conversion
address: Lukas Pielsticker
address: Muelheim an der Ruhr
email: [email protected]
orcid:
service: orcid
Expand Down Expand Up @@ -49,7 +49,7 @@ instrument:
identifier: null
energydispersion:
scheme: hemispherical
diameter:
radius:
unit: mm
value: 150
device_information:
Expand Down Expand Up @@ -141,7 +141,6 @@ instrument:
sample:
name: Polycristalline Au foil
sample_id: S718
atom_types: Au
physical_form: foil
situation: vacuum
substance:
Expand Down
Binary file modified examples/specs/xml/In-situ_PBTTT.nxs
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/specs/xml/eln_data_xml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ instrument:
scheme: hemispherical
entrance_slit: unknown
energy_scan_mode: fixed_analyser_transmission
diameter:
radius:
unit: mm
value: 150
device_information:
Expand Down Expand Up @@ -135,7 +135,7 @@ sample:
substance:
molecular_formula_hill: (C42H62S4)n
situation: vacuum
sample_history:
history:
sample_preparation:
start_time: 2022-04-08T11:02:38.0200Z
end_time: 2022-04-08T11:06:42.200Z
Expand Down
Binary file modified examples/specs/xy/MgFe2O4.nxs
Binary file not shown.
6 changes: 2 additions & 4 deletions examples/specs/xy/eln_data_xy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
title: EX439_S718_Au in 25 mbar O2
start_time: 2022-04-08T11:47:02.0200Z
end_time: 2022-04-08T14:52:26.0400Z
entry_identifier: EX439
experiment_institution: Max Planck Institute for Chemical Energy Conversion
experiment_facility: Surface and Interface Analysis Group
Expand Down Expand Up @@ -37,6 +35,7 @@ instrument:
unit: mm
analyser:
description: hemispherical
name: PHOIBOS 150 NAP-XPS analyser
device_information:
vendor: SPECS GmbH
model: PHOIBOS 150 NAP
Expand All @@ -49,7 +48,7 @@ instrument:
identifier: null
energydispersion:
scheme: hemispherical
diameter:
radius:
unit: mm
value: 150
device_information:
Expand Down Expand Up @@ -141,7 +140,6 @@ instrument:
sample:
name: Polycristalline Au foil
sample_id: S718
atom_types: Au
physical_form: foil
situation: vacuum
substance:
Expand Down
8 changes: 5 additions & 3 deletions examples/vms/eln_data_vms.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
title: XPS Experiment
start_time: 2022-04-08T11:47:02.0200Z
end_time: 2022-04-08T12:32:06.0200Z
program_name: SpecsLab 2
user:
name: Lukas Pielsticker
affiliation: Max Planck Institute for Chemical Energy Conversion
address: Muelheim an der Ruhr
email: [email protected]
instrument:
device_information:
Expand Down Expand Up @@ -36,14 +35,15 @@ instrument:
identifier: null
collectioncolumn:
scheme: angular dispersive
lens_mode: ARM22
device_information:
vendor: null
model: null
identifier: null
energydispersion:
scheme: hemispherical
energy_scan_mode: fixed_analyser_transmission
diameter:
radius:
unit: mm
value: 150
device_information:
Expand Down Expand Up @@ -130,7 +130,9 @@ instrument:
unit: null
sample:
description: CoO powder
physical_form: powder
substance:
name: CoO
molecular_formula_hill: CoO
situation: vacuum
history:
Expand Down
Loading

0 comments on commit 266d7ac

Please sign in to comment.