Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nomad-lab/nomad-distro
1 result
Show changes
Commits on Source (26)
Showing
with 2131 additions and 393 deletions
......@@ -25,8 +25,8 @@ default:
variables:
DOCKER_TAG: ${CI_COMMIT_REF_SLUG}
UV_VERSION: 0.4
PYTHON_VERSION: 3.11
UV_VERSION: 0.5
PYTHON_VERSION: 3.12
workflow:
rules:
......@@ -141,9 +141,9 @@ build python package:
rules:
- when: on_success
python test:
.base_tests:
image: ghcr.io/astral-sh/uv:$UV_VERSION-python$PYTHON_VERSION-bookworm
stage: test
stage: build
services:
- name: rabbitmq:3.11.5
alias: rabbitmq
......@@ -156,7 +156,6 @@ python test:
- name: mongo:5.0.6
alias: mongo
variables:
UV_SYSTEM_PYTHON: true
RABBITMQ_ERLANG_COOKIE: SWQOKODSQALRPCLNMEQG
RABBITMQ_DEFAULT_USER: rabbitmq
RABBITMQ_DEFAULT_PASS: rabbitmq
......@@ -166,11 +165,21 @@ python test:
NOMAD_MONGO_HOST: mongo
NOMAD_KEYCLOAK_PASSWORD: ${CI_KEYCLOAK_ADMIN_PASSWORD}
NOMAD_NORMALIZE_SPRINGER_DB_PATH: /nomad/fairdi/db/data/springer.msg
UV_EXTRA_INDEX_URL: "https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple"
before_script:
- uv pip install -e ".[dev]"
- uv pip install -r requirements.txt --system
- uv pip install ".[dev]" --system
python tests:
extends: .base_tests
script:
- python -m pytest -sv tests
plugin tests:
extends: .base_tests
script:
- python scripts/plugin_tests.py
check helm chart:
stage: test
image: ${CI_REGISTRY_IMAGE}:${DOCKER_TAG}
......@@ -250,34 +259,6 @@ check python dependencies:
- echo ${CLIENT_URL}
- nomad client -n $CLIENT_URL -u test -w $CI_NOMAD_TEST_PASSWORD integrationtests --skip-publish --skip-doi
deploy distro:
stage: deploy
extends:
- .tag image
variables:
TARGET_ENV: distro
before_script:
- echo "TARGET_ENV=distro" >> build.env
- echo "name=distro" >> build.env
- echo "deployment_tier=production" >> build.env
- echo "url=https://nomad-lab.eu/prod/v1/distro" >> build.env
artifacts:
reports:
dotenv: build.env
rules:
- when: manual
allow_failure: true
deploy distro image:
stage: deploy
needs: ["deploy distro"]
<<: *deploy_image
test distro deployment:
stage: deploy
needs: ["deploy distro", "deploy distro image"]
<<: *test_deployment
deploy test:
stage: deploy
extends:
......
......@@ -94,7 +94,7 @@ RUN ./scripts/generate_example_uploads.sh
FROM base_final AS final
COPY --chown=nomad:1000 --from=builder /opt/venv /opt/venv
COPY --chown=nomad:1000 --from=builder /app/examples/data/uploads /app/examples/data/uploads
COPY --chown=nomad:1000 --from=builder /app/examples/data /app/examples/data/
COPY --chown=nomad:1000 scripts/run.sh .
COPY --chown=nomad:1000 scripts/run-worker.sh .
......@@ -102,6 +102,8 @@ RUN mkdir -p /app/.volumes/fs \
&& chown -R nomad:1000 /app \
&& chown -R nomad:1000 /opt/venv
ENV NUMBA_CACHE_DIR="/tmp"
USER nomad
# The application ports
......
{"data":{"m_def":"../upload/raw/nxapm.schema.archive.yaml#/definitions/section_definitions/0","reader":"apm","nxdl":"NXapm.nxdl","input_files":["eln_data.yaml","Si.apt","Si.RRNG","apm.oasis.specific.yaml"],"output":"apm.nxs","entry":{"experiment_description":"<p>Normal</p>\n<p><strong>Bold</strong></p>\n<p><em>Italics</em></p>","start_time":"2023-06-12T13:57:00+00:00","end_time":"2023-06-12T13:57:00+00:00","run_number":"2121","operation_mode":"apt"},"workflow":{"raw_dat_file":"","hit_dat_file":"","recon_cfg_file":""},"sample":{"alias":"Si","method":"experiment","composition":["Si","Cr 2 +- 0.5","C 50 ppm +- 12"],"grain_diameter":200,"grain_diameter_error":50,"heat_treatment_temperature":600,"heat_treatment_temperature_error":20,"heat_treatment_quenching_rate":150,"heat_treatment_quenching_rate_error":10},"specimen":{"alias":"Si","method":"experiment","preparation_date":"2023-06-12T13:59:00+00:00","is_polycrystalline":false,"is_amorphous":false,"description":"this is a NOMAD example","initial_radius":20,"shank_angle":5},"user":[{"name":"MarkusK"},{"name":"Jesse Smith"}],"instrument":{"status":"success","instrument_name":"LEAP","location":"Denton","nominal_flight_path":1.2,"fabrication_vendor":"Cameca","fabrication_model":"LEAP3000","fabrication_identifier":"12","reflectron_status":"used","base_temperature":20,"chamber_pressure":2e-10,"target_detection_rate":0.8,"pulser":{"pulse_mode":"laser","pulse_frequency":250,"pulse_fraction":0.8,"laser_source":[{"name":"laser1","wavelength":254,"power":12,"pulse_energy":20},{"name":"laser2","wavelength":355,"power":24,"pulse_energy":40}]},"local_electrode_name":"L1"},"reconstruction":{"program":"IVAS","program_version":"3.6.8","protocol_name":"bas","parameter":"kf = 1.8, icf = 3.3","crystallographic_calibration":"n/a","field_of_view":20},"ranging":{"program":"IVAS","program_version":"3.6.8"}}}
\ No newline at end of file
{"data":{"m_def":"../upload/raw/nxapm.schema.archive.yaml#/definitions/section_definitions/0","reader":"apm","nxdl":"NXapm","input_files":["eln_data.yaml","Si.apt","Si.RRNG","apm.oasis.specific.yaml"],"output":"apm.nxs","entry":{"experiment_description":"<p>Normal</p>\n<p><strong>Bold</strong></p>\n<p><em>Italics</em></p>","start_time":"2023-06-12T13:57:00+00:00","end_time":"2023-06-12T13:57:00+00:00","run_number":"2121","operation_mode":"apt"},"workflow":{"raw_dat_file":"","hit_dat_file":"","recon_cfg_file":""},"sample":{"alias":"Si","method":"experiment","composition":["Si","Cr 2 +- 0.5","C 50 ppm +- 12"],"grain_diameter":200,"grain_diameter_error":50,"heat_treatment_temperature":600,"heat_treatment_temperature_error":20,"heat_treatment_quenching_rate":150,"heat_treatment_quenching_rate_error":10},"specimen":{"alias":"Si","method":"experiment","preparation_date":"2023-06-12T13:59:00+00:00","is_polycrystalline":false,"is_amorphous":false,"description":"this is a NOMAD example","initial_radius":20,"shank_angle":5},"user":[{"name":"MarkusK"},{"name":"Jesse Smith"}],"instrument":{"status":"success","instrument_name":"LEAP","location":"Denton","nominal_flight_path":1.2,"fabrication_vendor":"Cameca","fabrication_model":"LEAP3000","fabrication_identifier":"12","reflectron_status":"used","base_temperature":20,"chamber_pressure":2e-10,"target_detection_rate":0.8,"pulser":{"pulse_mode":"laser","pulse_frequency":250,"pulse_fraction":0.8,"laser_source":[{"name":"laser1","wavelength":254,"power":12,"pulse_energy":20},{"name":"laser2","wavelength":355,"power":24,"pulse_energy":40}]},"local_electrode_name":"L1"},"reconstruction":{"program":"IVAS","program_version":"3.6.8","protocol_name":"bas","parameter":"kf = 1.8, icf = 3.3","crystallographic_calibration":"n/a","field_of_view":20},"ranging":{"program":"IVAS","program_version":"3.6.8"}}}
\ No newline at end of file
......@@ -81,6 +81,10 @@ sample:
- C 3.6
method: experiment
alias: Si
identifier:
service: undefined
identifier: 'Si in sample'
is_persistent: false
grain_diameter:
unit: µm
value: 200.
......@@ -103,6 +107,10 @@ sample:
specimen:
method: experiment
alias: usa_denton_smith_si
identifier:
service: undefined
identifier: 'Si in specimen'
is_persistent: false
description: '<p>normal</p>
<p><em>bold</em></p>
......
......@@ -2,9 +2,9 @@
"data": {
"m_def": "../upload/raw/ellips.scheme.archive.yml#/definitions/section_definitions/0",
"reader": "ellips",
"nxdl": "NXellipsometry.nxdl",
"nxdl": "NXellipsometry",
"input_files": [
"test-data.data",
"test-data.dat",
"eln_data.yaml"
],
"output": "SiO2onSi.ellips.nxs",
......@@ -29,7 +29,7 @@
"ellipsometry_experiment_type": "NIR-Vis-UV spectroscopic ellipsometry",
"plot_name": "Psi and Delta",
"start_time": "2022-01-27T03:35:00+00:00",
"User": {
"user": {
"name": "Name Surname",
"affiliation": "Humboldt-Universität zu Berlin",
"address": "Zum Großen Windkanal 2, 12489 Berlin, Germany",
......@@ -40,8 +40,8 @@
"identifier": "exp-ID",
"is_persistent": "false"
},
"Instrument": {
"software_RC2": "CompleteEASE",
"instrument": {
"software_RC2": "CompleteEASE",
"software_RC2/@version": "6.37",
"software_RC2/@url": "https://www.jawoollam.com/ellipsometry-software/completeease",
"ellipsometer_type": "dual compensator",
......@@ -49,35 +49,41 @@
"light_source": {
"source_type": "arc lamp"
},
"Detector": {
"detector_type": "CCD spectrometer",
"detector": {
"detector_type": "CCD",
"detector_channel_type": "multichannel",
"count_time": 1
},
"Sample_stage": {
"stage_type": " manual stage"
"beam_source": {
"parameter_reliability": "nominal",
"associated_source": "entry/instrument/source_light",
"incident_wavelength": [193, 1700]
},
"sample_stage": {
"stage_type": "manual stage"
},
"focussing_probes": {
"data_correction": false,
"angular_spread": 0.2
"angular_spread": 0.2,
"type": "objective"
},
"rotating_element": {
"revolutions": 50,
"revolutions/@Units": "NX_COUNT"
},
"instrument_calibration_RC2": {
"calibration_status": " no calibration"
"calibration_status": "no calibration"
},
"device_information": {
"vendor": "J. A. Woollam Co.",
"model": "RC2",
"model/@version": "0.0.1"
"model": "RC2 (Vers. 0.0.1)"
}
},
"Sample": {
"sample": {
"atom_types": "Si, O",
"chemical_formula": "SiO2",
"layer_structure": "2nm SiO2 on Si",
"sample_name": "2nm SiO2 on Si",
"name": "2nm SiO2 on Si",
"physical_form": "multi layer",
"substrate": "Si",
"backside_roughness": false,
......@@ -85,7 +91,9 @@
"sample_medium": "air"
},
"history": {
"notes": "Commercially purchased sample"
"notes": {
"description":"Commercially purchased sample"
}
}
},
"Data": {
......
......@@ -8,7 +8,7 @@ definitions:
m_annotations:
template:
reader: ellips
nxdl: NXellipsometry.nxdl
nxdl: NXellipsometry
eln:
hide: []
quantities:
......@@ -101,7 +101,7 @@ definitions:
eln:
component: DateTimeEditQuantity
sub_sections:
User:
user:
section:
m_annotations:
eln:
......@@ -143,7 +143,7 @@ definitions:
m_annotations:
eln:
component: StringEditQuantity
Instrument:
instrument:
section:
m_annotations:
eln:
......@@ -193,7 +193,7 @@ definitions:
m_annotations:
eln:
component: StringEditQuantity
Detector:
detector:
section:
quantities:
detector_type:
......@@ -201,6 +201,11 @@ definitions:
m_annotations:
eln:
component: StringEditQuantity
detector_channel_type:
type: str
m_annotations:
eln:
component: StringEditQuantity
count_time:
type: np.float64
unit: second
......@@ -209,6 +214,27 @@ definitions:
component: NumberEditQuantity
minValue: 0
defaultDisplayUnit: "s"
beam_source:
section:
quantities:
parameter_reliability:
type: str
m_annotations:
eln:
component: StringEditQuantity
associated_source:
type: str
m_annotations:
eln:
component: StringEditQuantity
incident_wavelength:
type: np.float64
shape: ["*"]
unit: nanometer
m_annotations:
eln:
component: NumberEditQuantity
defaultDisplayUnit: "nm"
focussing_probes:
section:
quantities:
......@@ -217,6 +243,11 @@ definitions:
m_annotations:
eln:
component: BoolEditQuantity
type:
type: str
m_annotations:
eln:
component: StringEditQuantity
angular_spread:
type: np.float64
unit: radian
......@@ -229,15 +260,11 @@ definitions:
quantities:
revolutions:
type: np.float64
unit: radian / radian
m_annotations:
eln:
component: NumberEditQuantity
revolutions/@unit:
type: str
m_annotations:
eln:
component: StringEditQuantity
Sample_stage:
sample_stage:
section:
quantities:
stage_type:
......@@ -245,14 +272,6 @@ definitions:
m_annotations:
eln:
component: StringEditQuantity
instrument_calibration_RC2:
section:
quantities:
calibration_status:
type: str
m_annotations:
eln:
component: StringEditQuantity
device_information:
section:
quantities:
......@@ -266,12 +285,18 @@ definitions:
m_annotations:
eln:
component: StringEditQuantity
model/@version:
instrument_calibration_RC2:
section:
m_annotations:
eln:
overview: true
quantities:
calibration_status:
type: str
m_annotations:
eln:
component: StringEditQuantity
Sample:
sample:
section:
m_annotations:
eln:
......@@ -298,7 +323,7 @@ definitions:
m_annotations:
eln:
component: StringEditQuantity
sample_name:
name:
type: str
m_annotations:
eln:
......@@ -330,12 +355,18 @@ definitions:
m_annotations:
eln:
overview: true
quantities:
sub_sections:
notes:
type: str
m_annotations:
eln:
component: StringEditQuantity
section:
m_annotations:
eln:
overview: true
quantities:
description:
type: str
m_annotations:
eln:
component: StringEditQuantity
Data:
section:
m_annotations:
......
......@@ -6,17 +6,16 @@ Data:
data_type: Psi/Delta
spectrum_type: wavelength
spectrum_unit: angstrom
Instrument:
Detector:
instrument:
detector:
count_time:
unit: s
value: 1.0
detector_type: CCD spectrometer
Sample_stage:
stage_type: ' manual stage'
detector_type: CCD
sample_stage:
stage_type: 'manual stage'
device_information:
model: RC2
model/@version: 0.0.1
model: 'RC2 (Vers. 0.0.1)'
vendor: J. A. Woollam Co.
ellipsometer_type: dual compensator
focussing_probes:
......@@ -25,7 +24,7 @@ Instrument:
value: 0.2
data_correction: false
instrument_calibration_RC2:
calibration_status: ' no calibration'
calibration_status: 'no calibration'
light_source:
source_type: arc lamp
rotating_element:
......@@ -34,19 +33,20 @@ Instrument:
software_RC2: CompleteEASE
software_RC2/@url: https://www.jawoollam.com/ellipsometry-software/completeease
software_RC2/@version: '6.37'
Sample:
sample:
atom_types: Si, O
backside_roughness: false
chemical_formula: SiO2
environment:
sample_medium: air
history:
notes: Commercially purchased sample
notes:
description: Commercially purchased sample
layer_structure: 2nm SiO2 on Si
physical_form: multi layer
sample_name: 2nm SiO2 on Si
name: 2nm SiO2 on Si
substrate: Si
User:
user:
address: Zum Großen Windkanal 2, 12489 Berlin, Germany
affiliation: Humboldt-Universität zu Berlin
email: surname.name@physik.hu-berlin.de
......
{"data":{"m_def":"../upload/raw/nxem.schema.archive.yaml#/definitions/section_definitions/0","reader":"em","nxdl":"NXem.nxdl","input_files":["InGaN_nanowires_spectra.edaxh5","eln_data.yaml","em.oasis.specific.yaml"],"output":"em.nxs","entry":{"experiment_alias":"test","start_time":"2024-05-08T12:56:00+00:00","end_time":"2024-05-08T12:56:00+00:00","experiment_description":"<p>Normal</p>\n<p><strong>Bold</strong></p>\n<p><em>Italics</em></p>"},"sample":{"method":"experiment","name":"test","atom_types":"In, Ga, N","preparation_date":"2024-05-08T13:06:00+00:00","thickness":100.0},"user":[{"name":"JonasL","orcid":"0000"},{"name":"AidanC"},{"name":"MarkusK"},{}]}}
\ No newline at end of file
{"data":{"m_def":"../upload/raw/nxem.schema.archive.yaml#/definitions/section_definitions/0","reader":"em","nxdl":"NXem","input_files":["InGaN_nanowires_spectra.edaxh5","eln_data.yaml","em.oasis.specific.yaml"],"output":"em.nxs","entry":{"experiment_alias":"test","start_time":"2024-05-08T12:56:00+00:00","end_time":"2024-05-08T12:56:00+00:00","experiment_description":"<p>Normal</p>\n<p><strong>Bold</strong></p>\n<p><em>Italics</em></p>"},"sample":{"method":"experiment","name":"test","atom_types":"In, Ga, N","preparation_date":"2024-05-08T13:06:00+00:00","thickness":100.0},"user":[{"name":"JonasL","orcid":"0000"},{"name":"AidanC"},{"name":"MarkusK"},{}]}}
\ No newline at end of file
......@@ -2,7 +2,7 @@
"data": {
"m_def": "../upload/raw/IV_temp.schema.archive.yaml#/definitions/section_definitions/0",
"reader": "json_map",
"nxdl": "NXiv_temp.nxdl",
"nxdl": "NXiv_temp",
"input_files": [
"IV_temp.mapping.json",
"IV_temp.pickle"
......@@ -10,4 +10,4 @@
"output": "IV_temp.nxs"
},
"m_ref_archives": {}
}
\ No newline at end of file
}
......@@ -8,7 +8,7 @@ definitions:
m_annotations:
template:
reader: json_map
nxdl: NXiv_temp.nxdl
nxdl: NXiv_temp
input_files": [
"IV_temp.mapping.json",
"IV_temp.pickle"
......
%% Cell type:markdown id: tags:
# Converting Multidimensional Photoemission Spectroscopy (MPES) data into the NeXus format
%% Cell type:markdown id: tags:
This example shows how to convert x-array based h5 measurement files as generated by the [preprocessing output](https://www.nature.com/articles/s41597-020-00769-8) of the software used at the Fritz-Haber Institute into the [MPES NeXus format](https://manual.nexusformat.org/classes/contributed_definitions/NXmpes.html#nxmpes).
For an example on how to generate such a h5 measurement file please refer to the [binning example](./E2%20Binning%20of%20WSe2.ipynb).
For an example on how to generate such a h5 measurement file please refer to the [postprocessing example](./E2%20ARPES%20postprocessing.ipynb).
%% Cell type:markdown id: tags:
## Download the data
Since the provided datafile is comparably large (~200MB) it is not directly provided with the example.
You can [download](https://zenodo.org/record/7573825/files/MoTe2.h5?download=1) it from zenodo. Place the file in the directory of this notebook afterwards. Under Linux, macOS and in a NORTH container you can directly use the cell below to download the file with curl.
%% Cell type:code id: tags:skip-execution
``` python
! curl -o MoTe2.h5 "https://zenodo.org/records/7573825/files/MoTe2.h5?download=1"
```
%% Cell type:markdown id: tags:
## Convert the file to NeXus
To convert the available files to the NeXus format we use the convert function readily supplied by pynxtools.
It uses the downloaded measurement file, a json config file and optionally an electronic lab notebook (ELN) yaml file that is used in the [binning of WSe2 example](./E2%20Binning%20of%20WSe2.ipynb).
The json config file maps specific metadata from the h5 measurement file to the nxs file, i.e. a pressure reading which automatically gets collected during measurement.
The ELN is a file which supplies additional metadata which is written into the NeXus file.
This is data which is not collected automatically, such as the person conducting the experiment.
It can be written manually or generated, e.g. by the NOMAD ELN functionality.
The convert command may also be executed in the command line with the command `dataconverter`:
```
dataconverter \
--reader mpes \
--nxdl NXmpes \
--input-file MoTe2.h5 \
--input-file config_file.json \
--output MoTe2.mpes.nxs
--output MoTe2.mpes.nxs \
MoTe2.h5 \
config_file.json
```
%% Cell type:code id: tags:
``` python
from pynxtools.dataconverter.convert import convert
```
%% Cell type:markdown id: tags:
The input parameters are defined as follows:
**reader**: The specific reader which gets called inside pynxtools. This is supplied in the pynxtools python code. If you create a specific reader for your measurement file it gets selecetd here. If you use the binning procedure from FHI to generate a xarray h5 file you should use the reader called `mpes`.
**nxdl**: The specific nxdl file to be used. For MPES this should always be `NXmpes` or one of its subdefinitions of the form `NXmpes_<name>`.
**output**: The output filename of the NeXus file.
%% Cell type:code id: tags:
``` python
convert(input_file=["MoTe2.h5", "config_file.json"],
reader='mpes',
nxdl='NXmpes',
output='MoTe2.mpes.nxs')
```
%% Cell type:markdown id: tags:
## View the data with H5Web
H5Web is a tool for visualizing any data in the h5 data format. Since the NeXus format builds opon h5 it can be used to view this data as well. We just import the package and call H5Web with the output filename from the convert command above. For an analysis on NeXus data files please refer to [analysis example](./E3%20pyARPES%20analysis.ipynb).
You can also view this data with the H5Viewer or other tools from your local filesystem.
%% Cell type:code id: tags:
``` python
from jupyterlab_h5web import H5Web
```
%% Cell type:code id: tags:
``` python
H5Web('MoTe2.mpes.nxs')
```
......
This diff is collapsed.
%% Cell type:markdown id:17a6a4f9-8c8a-49f3-b267-ee38d68d4a50 tags:
# Analysing Multidimensional Photoemission Spectroscopy (MPES) data with pyARPES
This example shows how to analyse data in the NeXus format with the [pyARPES](https://github.com/chstan/arpes) python package. You'll find details on how to generate such NeXus files in the [convert](./E1%20Convert%20to%20NeXus.ipynb) or [binning](./E2%20Binning%20of%20WSe2.ipynb) example.
This example shows how to analyse data in the NeXus format with the [pyARPES](https://github.com/chstan/arpes) python package. You'll find details on how to generate such NeXus files in the [convert](./E1%20Convert%20to%20NeXus.ipynb) or [postprocessing](./E2%20ARPES%20postprocessing.ipynb) example.
%% Cell type:code id:a8fb79b7-7379-4309-9298-dc16fba67c70 tags:
``` python
from arpes.plotting.qt_tool import qt_tool
from arpes.plotting.basic_tools import path_tool
from arpes.io import example_data, load_data
from arpes.endstations.plugin.nexus import NeXusEndstation
import xarray as xr
import numpy as np
from pathlib import Path
import h5py as h5
```
%% Cell type:markdown id:a98808fd-8d13-4cd9-98a0-ab55c8c40f15 tags:
## Download the data
First we set the file directory and create it if not already present.
%% Cell type:code id:e9658e8f-21e3-445e-b04f-c8657f707fb6 tags:
``` python
FDIR = "TiTe2"
! mkdir -p '{FDIR}'
```
%% Cell type:markdown id:14597c45-b958-434c-b0ed-f31ad68378bc tags:
Since the provided datafile is comparably large (~200MB) it is not directly provided with the example.
You can download the data for [zero](https://zenodo.org/record/5541490/files/TiTe2_0deg.nxs?download=1) and [60 degree](https://zenodo.org/record/5541490/files/TiTe2_60deg.nxs?download=1) from zenodo. Place the files in the FDIR directory specified in the cell above. Under Linux, macOS and in a NORTH container you can directly use the cell below to download the files with curl.
%% Cell type:code id:58315f02-ae42-4318-abdc-e102e1753290 tags:
``` python
! curl -o "{FDIR}/TiTe2_0deg.nxs" "https://zenodo.org/records/5541490/files/TiTe2_0deg.nxs?download=1"
! curl -o "{FDIR}/TiTe2_60deg.nxs" "https://zenodo.org/records/5541490/files/TiTe2_60deg.nxs?download=1"
```
%% Cell type:markdown id:ea6ea584-fe25-4af1-ae72-6ae7d7f34830 tags:
## Load data into a xarray
Extract the NeXus file into an xArray. In the future, mode advanced loading APIs will be developed, transferring all useful metadata.
%% Cell type:code id:3b259695-1f73-4bd1-a1bc-4b5abd0432a6 tags:
``` python
h5_TiTe2_0deg = h5.File(f'{FDIR}/TiTe2_0deg.nxs', 'r' )
meas_TiTe2_0deg = xr.DataArray(
h5_TiTe2_0deg['entry/data/Photoemission intensity'][:],
coords={'BE': h5_TiTe2_0deg['entry/data/calculated_Energy'][:],
'kx': h5_TiTe2_0deg['entry/data/calculated_kx'][:],
'ky': h5_TiTe2_0deg['entry/data/calculated_ky'][:]},
)
h5_TiTe2_60deg = h5.File(f'{FDIR}/TiTe2_60deg.nxs', 'r' )
meas_TiTe2_60deg = xr.DataArray(
h5_TiTe2_60deg['entry/data/Photoemission intensity'][:],
coords={'BE': h5_TiTe2_60deg['entry/data/calculated_Energy'][:],
'kx': h5_TiTe2_60deg['entry/data/calculated_kx'][:],
'ky': h5_TiTe2_60deg['entry/data/calculated_ky'][:]},
)
```
%% Cell type:markdown id:1d7de2d8-025f-4ead-9342-3c40f530b7fe tags:
## Visualize 0º data
You can use the "Axes" tab to transpose the volume to obtain the optimal panel arrangement.
%% Cell type:code id:a9436bce-4f5d-4f68-9f8b-c0f5ee1ef3d3 tags:
``` python
qt_tool(meas_TiTe2_0deg)
```
%% Cell type:markdown id:88310069-fb9a-48c4-a490-072118176937 tags:
## Visualize 60º data
%% Cell type:code id:a01b408e-1caf-400c-a72f-0b21d7085916 tags:
``` python
qt_tool(meas_TiTe2_60deg)
```
%% Cell type:markdown id:7769f64f-1efd-4bd6-a905-a7cfcd9aea20 tags:
## View the difference between the angles
Noticed the asymmetry in the electron pockts at the Fermi surface? Let's make it shine!
We calculate the difference between the two angles and visualize it.
Unfortunately, there are only linear colorscales available in pyARPES.
The resulting data resembles the main observation in this [paper](https://arxiv.org/pdf/2107.07158.pdf).
%% Cell type:code id:9aa56079-be66-4575-91c9-7bc77213893f tags:
``` python
qt_tool(meas_TiTe2_0deg - meas_TiTe2_60deg)
```
%% Cell type:markdown id:6310460a-c58f-49bc-8d64-cfcf87f2fc51 tags:
## 4D visualization
%% Cell type:markdown id:c2e62727-32c9-432e-9d25-9d35b4347811 tags:
We can also test 4D data. The procedure is the same: [download](https://zenodo.org/record/4632481/files/201905_MoTe2.nxs?download=1) the data, convert it to xarray and show it with `qt_tool`.
%% Cell type:code id:4bf60894-22d3-4034-a808-311f285278bc tags:
``` python
! curl -o "{FDIR}/MoTe2_dyn.nxs" "https://zenodo.org/records/4632481/files/201905_MoTe2.nxs?download=1"
```
%% Cell type:code id:dda4bc9a-9729-4bd3-9456-a174427e7a3c tags:
``` python
h5_MoTe2_dyn = h5.File(f'{FDIR}/MoTe2_dyn.nxs', 'r')
meas_MoTe2_dyn = xr.DataArray(
h5_MoTe2_dyn['entry/data/Photoemission intensity'][:],
coords={'tpp': np.squeeze(h5_MoTe2_dyn['entry/data/calculated_Tpp'][:]),
'BE': np.squeeze(h5_MoTe2_dyn['entry/data/calculated_Energy'][:]),
'kx': np.squeeze(h5_MoTe2_dyn['entry/data/calculated_kx'][:]),
'ky': np.squeeze(h5_MoTe2_dyn['entry/data/calculated_ky'][:])},
)
```
%% Cell type:markdown id:e44915a3-e13f-4bb9-a6d5-3af34c113d09 tags:
At the Fermi energy, you will see an electron pocket appearing close to time zero and disappearing immediately after wards. This is the signature of a dynamical Lifshitz transition, a change in the topology of the Fermi surface. To learn more, read https://www.science.org/doi/10.1126/sciadv.abd9275'
%% Cell type:code id:cb0b2144-7ae8-401e-a351-6416098c408a tags:
``` python
qt_tool(meas_MoTe2_dyn)
```
......
%% Cell type:markdown id: tags:
# Convert measurement angles to k-space
In this example, we will use the NeXus format to automatically detect and read the angles from an ARPES measurement and do a k-space conversion with pyArpes.
%% Cell type:code id: tags:
``` python
import warnings
warnings.filterwarnings("ignore")
import numpy as np
from arpes.io import load_data
from arpes.endstations.plugin.nexus import NeXusEndstation
from arpes.utilities.conversion import convert_to_kspace
%matplotlib inline
```
%% Cell type:markdown id: tags:
# Download data
First we need to automatically download the data from [Nomad](https://nomad-lab.eu/prod/v1/api/v1/entries/xV9yMspIyXMfia6nNw3NIbnlZ91H/raw/Scan1496.nxs).
%% Cell type:code id: tags:
``` python
! curl -o Scan1496.nxs https://nomad-lab.eu/prod/v1/api/v1/entries/xV9yMspIyXMfia6nNw3NIbnlZ91H/raw/Scan1496.nxs
```
%% Cell type:markdown id: tags:
## Load data
%% Cell type:code id: tags:
``` python
Scan1496 = load_data("Scan1496.nxs", location=NeXusEndstation)
```
%% Cell type:markdown id: tags:
Apply rotational offset from experimental geometry
%% Cell type:code id: tags:
``` python
Scan1496.S.apply_offsets({
"chi": 19/180*np.pi,
})
```
%% Cell type:markdown id: tags:
Subtract photon energy
%% Cell type:code id: tags:
``` python
Scan1496_shifted = Scan1496
Scan1496_shifted['eV'] = Scan1496_shifted['eV'] - Scan1496.attrs["hv"].magnitude
```
%% Cell type:markdown id: tags:
We read all metadata from the nexus file into xarray attributes for easy programmatic access.
%% Cell type:code id: tags:
``` python
Scan1496_shifted.attrs
```
%% Cell type:markdown id: tags:
We can easily readout interesting values including their units, e.g., the incident photon energy of the beam:
%% Cell type:code id: tags:
``` python
Scan1496_shifted.attrs['instrument/beam_probe/incident_energy']
```
%% Cell type:markdown id: tags:
## Generate Fermi surface
%% Cell type:code id: tags:
``` python
fsmap = Scan1496_shifted.S.generic_fermi_surface(0)
fsmap.S.plot()
```
%% Cell type:markdown id: tags:
## Convert into k-space
%% Cell type:code id: tags:
``` python
fsmap_converted = convert_to_kspace(
fsmap,
kx=np.linspace(-.6, .6, 400),
ky=np.linspace(-1.2, 1.2, 400),
)
```
%% Cell type:code id: tags:
``` python
fsmap_converted.T.plot()
```
%% Cell type:code id: tags:
``` python
Scan1496_converted = convert_to_kspace(
Scan1496,
kx=np.linspace(-.6, .6, 400),
ky=np.linspace(-1.2, 1.2, 400),
)
```
%% Cell type:code id: tags:
``` python
Scan1496_converted.S.generic_fermi_surface(0).T.plot()
```
%% Cell type:code id: tags:
``` python
Scan1496.loc[{"eV":slice(1, 1.2)}].sum(dim="eV").S.plot()
```
%% Cell type:code id: tags:
``` python
Scan1496_converted.loc[{"eV":slice(1, 1.2)}].sum(dim="eV").S.plot()
```
%% Cell type:code id: tags:
``` python
```
{
"data": {
"m_def": "pynxtools.nomad.dataconverter.NexusDataConverter",
"m_def": "nomad.datamodel.metainfo.eln.nexus_data_converter.NexusDataConverter",
"input_files": [
"MoTe2.h5",
"config_file.json"
......
This diff is collapsed.
{
"/@default": "entry",
"/ENTRY[entry]/@default": "data",
"/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_identifier": {
"identifier":"@attrs:metadata/entry_identifier"
},
"/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",
"role": "@attrs:metadata/user0/role",
"affiliation": "@attrs:metadata/user0/affiliation",
"address": "@attrs:metadata/user0/address",
"email": "@attrs:metadata/user0/email"
},
"/ENTRY[entry]/INSTRUMENT[instrument]": {
"name": "Time-of-flight momentum microscope equipped delay line detector, at the endstation of the high rep-rate HHG source at FHI",
"name/@short_name": "TR-ARPES @ FHI",
"energy_resolution": {
"resolution": 140.0,
"resolution/@units": "meV",
"physical_quantity": "energy",
"type": "estimated"
},
"RESOLUTION[temporal_resolution]": {
"resolution": 35.0,
"resolution/@units": "fs",
"physical_quantity": "time",
"type": "estimated"
},
"RESOLUTION[momentum_resolution]": {
"resolution": "@attrs:metadata/instrument/analyzer/momentum_resolution",
"resolution/@units": "1/angstrom",
"physical_quantity": "momentum",
"type": "estimated"
},
"pressure_gauge": {
"name": "sample_chamber_pressure",
"measurement": "pressure",
"value": "@attrs:metadata/file/trARPES:XGS600:PressureAC:P_RD",
"value/@units": "mbar"
},
"ELECTRONANALYSER[electronanalyser]": {
"description": "SPECS Metis 1000 Momentum Microscope",
"device_information": {
"vendor": "SPECS GmbH",
"model": "Metis 1000 Momentum Microscope"
},
"fast_axes": [
"kx",
"ky",
"E"
],
"slow_axes": "@attrs:metadata/instrument/analyzer/slow_axes",
"energy_resolution": {
"resolution": 110.0,
"resolution/@units": "meV",
"physical_quantity": "energy",
"type": "estimated"
},
"momentum_resolution": {
"resolution": "@attrs:metadata/instrument/analyzer/momentum_resolution",
"resolution/@units": "1/angstrom",
"physical_quantity": "momentum",
"type": "estimated"
},
"spatial_resolution": {
"resolution": "@attrs:metadata/instrument/analyzer/spatial_resolution",
"resolution/@units": "µm",
"physical_quantity": "length",
"type": "estimated"
},
"depends_on": "/entry/instrument/electronanalyser/transformations/trans_z",
"TRANSFORMATIONS[transformations]": {
"AXISNAME[trans_z]": 4.0,
"AXISNAME[trans_z]/@depends_on": "rot_y",
"AXISNAME[trans_z]/@transformation_type": "translation",
"AXISNAME[trans_z]/@units": "mm",
"AXISNAME[trans_z]/@vector": [
0,
0,
1
],
"AXISNAME[rot_y]": -115.0,
"AXISNAME[rot_y]/@depends_on": ".",
"AXISNAME[rot_y]/@transformation_type": "rotation",
"AXISNAME[rot_y]/@units": "degrees",
"AXISNAME[rot_y]/@vector": [
0,
1,
0
]
}
}
},
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]": {
"projection": "@attrs:metadata/instrument/analyzer/projection",
"scheme": "momentum dispersive",
"lens_mode": "@attrs:metadata/instrument/analyzer/lens_mode",
"extractor_voltage": "@attrs:metadata/file/KTOF:Lens:Extr:V",
"extractor_voltage/@units": "V",
"extractor_current": "@attrs:metadata/file/KTOF:Lens:Extr:I",
"extractor_current/@units": "µA",
"working_distance": 4.0,
"working_distance/@units": "mm",
"LENS_EM[lens_*{A,B,C,D,E,F,G,H,I,UCA,UFA,Foc}]": {
"name": "*",
"voltage": "@attrs:metadata/file/KTOF:Lens:*:V",
"voltage/@units": "V"
},
"field_aperture": {
"shape": "@attrs:metadata/instrument/analyzer/fa_shape",
"size": "@attrs:metadata/instrument/analyzer/fa_size",
"size/@units": "µm",
"POSITIONER[fa_m1]": {
"value": "@attrs:metadata/file/KTOF:Apertures:m1.RBV",
"value/@units": "mm"
},
"POSITIONER[fa_m2]": {
"value": "@attrs:metadata/file/KTOF:Apertures:m2.RBV",
"value/@units": "mm"
}
},
"contrast_aperture": {
"shape": "@attrs:metadata/instrument/analyzer/ca_shape",
"size": "@attrs:metadata/instrument/analyzer/ca_size",
"size/@units": "µm",
"POSITIONER[ca_m3]": {
"value": "@attrs:metadata/file/KTOF:Apertures:m3.RBV",
"value/@units": "mm"
}
}
},
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]": {
"pass_energy": "@attrs:metadata/file/KTOF:Lens:TOF:V",
"pass_energy/@units": "eV",
"scheme": "tof",
"tof_distance": 0.9,
"tof_distance/@units": "m"
},
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]": {
"amplifier_type": "MCP",
"detector_type": "DLD",
"sensor_pixels": [
1800,
1800
],
"sensor_pixels/@units": "",
"amplifier_bias": "@attrs:metadata/file/KTOF:Lens:MCPfront:V",
"amplifier_bias/@units": "V",
"amplifier_voltage": "@attrs:metadata/file/KTOF:Lens:MCPback:V",
"amplifier_voltage/@units": "V",
"detector_voltage": "@attrs:metadata/file/KTOF:Lens:UDLD:V",
"detector_voltage/@units": "V"
},
"/ENTRY[entry]/INSTRUMENT[instrument]/sourceTYPE[source_probe]": {
"name": "HHG @ TR-ARPES @ FHI",
"probe": "photon",
"type": "HHG laser",
"mode": "Single Bunch",
"frequency": "@attrs:metadata/instrument/beam/probe/frequency",
"frequency/@units": "kHz",
"associated_beam": "/entry/instrument/beam_probe"
},
"/ENTRY[entry]/INSTRUMENT[instrument]/beamTYPE[beam_probe]": {
"distance": 0.0,
"distance/@units": "mm",
"incident_energy": "@attrs:metadata/instrument/beam/probe/incident_energy",
"incident_energy/@units": "eV",
"incident_energy_spread": "@attrs:metadata/instrument/beam/probe/incident_energy_spread",
"incident_energy_spread/@units": "eV",
"pulse_duration": "@attrs:metadata/instrument/beam/probe/pulse_duration",
"pulse_duration/@units": "fs",
"incident_polarization": "@attrs:metadata/instrument/beam/probe/incident_polarization",
"incident_polarization/@units": "V^2/mm^2",
"extent": "@attrs:metadata/instrument/beam/probe/extent",
"extent/@units": "µm",
"associated_source": "/entry/instrument/source_probe"
},
"/ENTRY[entry]/INSTRUMENT[instrument]/sourceTYPE[source_pump]": {
"name": "OPCPA @ TR-ARPES @ FHI",
"probe": "visible light",
"type": "Optical Laser",
"mode": "Single Bunch",
"frequency": "@attrs:metadata/instrument/beam/pump/frequency",
"frequency/@units": "kHz",
"associated_beam": "/entry/instrument/beam_pump"
},
"/ENTRY[entry]/INSTRUMENT[instrument]/beamTYPE[beam_pump]": {
"distance": 0.0,
"distance/@units": "mm",
"incident_energy": "@attrs:metadata/instrument/beam/pump/incident_energy",
"incident_energy/@units": "eV",
"incident_energy_spread": "@attrs:metadata/instrument/beam/pump/incident_energy_spread",
"incident_energy_spread/@units": "eV",
"incident_wavelength": "@attrs:metadata/instrument/beam/pump/incident_wavelength",
"incident_wavelength/@units": "nm",
"pulse_duration": "@attrs:metadata/instrument/beam/pump/pulse_duration",
"pulse_duration/@units": "fs",
"incident_polarization": "@attrs:metadata/instrument/beam/pump/incident_polarization",
"incident_polarization/@units": "V^2/mm^2",
"pulse_energy": "@attrs:metadata/instrument/beam/pump/pulse_energy",
"pulse_energy/@units": "µJ",
"average_power": "@attrs:metadata/instrument/beam/pump/average_power",
"average_power/@units": "mW",
"extent": "@attrs:metadata/instrument/beam/pump/extent",
"extent/@units": "µm",
"fluence": "@attrs:metadata/instrument/beam/pump/fluence",
"fluence/@units": "mJ/cm^2",
"associated_source": "/entry/instrument/source_pump"
},
"/ENTRY[entry]/INSTRUMENT[instrument]/MANIPULATOR[manipulator]": {
"temperature_sensor": {
"name": "sample_temperature",
"measurement": "temperature",
"value": "@attrs:metadata/file/trARPES:Carving:TEMP_RBV",
"value/@units": "K"
},
"sample_bias_voltmeter": {
"name": "sample_bias",
"measurement": "voltage",
"value": "@attrs:metadata/file/KTOF:Lens:Sample:V",
"value/@units": "V"
},
"depends_on": "/entry/instrument/manipulator/transformations/trans_z",
"TRANSFORMATIONS[transformations]": {
"AXISNAME[trans_z]": -0.32,
"AXISNAME[trans_z]/@depends_on": "rot_z",
"AXISNAME[trans_z]/@transformation_type": "translation",
"AXISNAME[trans_z]/@units": "m",
"AXISNAME[trans_z]/@vector": [
0,
0,
1
],
"AXISNAME[rot_z]/@depends_on": "rot_x",
"AXISNAME[rot_z]": -25.0,
"AXISNAME[rot_z]/@transformation_type": "rotation",
"AXISNAME[rot_z]/@units": "degrees",
"AXISNAME[rot_z]/@vector": [
0,
0,
1
],
"AXISNAME[rot_x]/@depends_on": ".",
"AXISNAME[rot_x]": -90.0,
"AXISNAME[rot_x]/@transformation_type": "rotation",
"AXISNAME[rot_x]/@units": "degrees",
"AXISNAME[rot_x]/@vector": [
1,
0,
0
]
}
},
"/ENTRY[entry]/SAMPLE[sample]": {
"preparation_date": "@attrs:metadata/sample/preparation_date",
"history/notes/type": "text/plain",
"history/notes/description": "@attrs:metadata/sample/sample_history",
"description": "@attrs:metadata/sample/chemical_formula",
"name": "@attrs:metadata/sample/chemical_formula",
"situation": "vacuum",
"SUBSTANCE[substance]/molecular_formula_hill": "@attrs:metadata/sample/chemical_formula",
"temperature_env": {
"temperature_sensor": "@link:/entry/instrument/manipulator/temperature_sensor"
},
"gas_pressure_env": {
"pressure_gauge": "@link:/entry/instrument/pressure_gauge"
},
"bias_env": {
"voltmeter": "@link:/entry/instrument/manipulator/sample_bias_voltmeter"
},
"depends_on": "/entry/sample/transformations/corrected_phi",
"TRANSFORMATIONS[transformations]": {
"AXISNAME[corrected_phi]/@depends_on": "rot_omg",
"AXISNAME[corrected_phi]": 90.0,
"AXISNAME[corrected_phi]/@units": "degrees",
"AXISNAME[corrected_phi]/@transformation_type": "rotation",
"AXISNAME[corrected_phi]/@vector": [
0,
1,
0
],
"AXISNAME[rot_omg]/@depends_on": "rot_phi",
"AXISNAME[rot_omg]": "@attrs:metadata/file/trARPES:Carving:OMG.RBV",
"AXISNAME[rot_omg]/@units": "degrees",
"AXISNAME[rot_omg]/@transformation_type": "rotation",
"AXISNAME[rot_omg]/@vector": [
1,
0,
0
],
"AXISNAME[rot_phi]/@depends_on": "rot_tht",
"AXISNAME[rot_phi]": "@attrs:metadata/file/trARPES:Carving:PHI.RBV",
"AXISNAME[rot_phi]/@units": "degrees",
"AXISNAME[rot_phi]/@transformation_type": "rotation",
"AXISNAME[rot_phi]/@vector": [
0,
1,
0
],
"AXISNAME[rot_tht]/@depends_on": "trans_z",
"AXISNAME[rot_tht]": "@attrs:metadata/file/trARPES:Carving:THT.RBV",
"AXISNAME[rot_tht]/@units": "degrees",
"AXISNAME[rot_tht]/@transformation_type": "rotation",
"AXISNAME[rot_tht]/@vector": [
0,
0,
1
],
"AXISNAME[trans_z]/@depends_on": "trans_y",
"AXISNAME[trans_z]": "@attrs:metadata/file/trARPES:Carving:TRZ.RBV",
"AXISNAME[trans_z]/@units": "mm",
"AXISNAME[trans_z]/@transformation_type": "translation",
"AXISNAME[trans_z]/@vector": [
0,
0,
1
],
"AXISNAME[trans_y]/@depends_on": "trans_x",
"AXISNAME[trans_y]": "@attrs:metadata/file/trARPES:Carving:TRY.RBV",
"AXISNAME[trans_y]/@units": "mm",
"AXISNAME[trans_y]/@transformation_type": "translation",
"AXISNAME[trans_y]/@vector": [
0,
1,
0
],
"AXISNAME[trans_x]/@depends_on": "/entry/instrument/manipulator/transformations/trans_z",
"AXISNAME[trans_x]": "@attrs:metadata/file/trARPES:Carving:TRX.RBV",
"AXISNAME[trans_x]/@units": "mm",
"AXISNAME[trans_x]/@transformation_type": "translation",
"AXISNAME[trans_x]/@vector": [
1,
0,
0
]
}
},
"/ENTRY[entry]/PROCESS_MPES[process]/DISTORTION[distortion]": {
"symmetry": "@attrs:metadata/momentum_correction/rotsym",
"symmetry/@units": "",
"original_centre": "@attrs:metadata/momentum_correction/pcent",
"original_centre/@units": "",
"original_points": "@attrs:metadata/momentum_correction/pouter",
"original_points/@units": "",
"cdeform_field": "@attrs:metadata/momentum_correction/cdeform_field",
"cdeform_field/@units": "",
"rdeform_field": "@attrs:metadata/momentum_correction/rdeform_field",
"rdeform_field/@units": ""
},
"/ENTRY[entry]/PROCESS_MPES[process]/REGISTRATION[registration]": {
"depends_on": "/entry/process/registration/transformations/rot_z",
"TRANSFORMATIONS[transformations]": {
"AXISNAME[trans_x]": "@attrs:metadata/momentum_correction/adjust_params/xtrans",
"AXISNAME[trans_x]/@transformation_type": "translation",
"AXISNAME[trans_x]/@units": "pixels",
"AXISNAME[trans_x]/@vector": "@attrs:metadata/momentum_correction/adjust_params/x_vector",
"AXISNAME[trans_x]/@depends_on": ".",
"AXISNAME[trans_y]": "@attrs:metadata/momentum_correction/adjust_params/ytrans",
"AXISNAME[trans_y]/@units": "pixels",
"AXISNAME[trans_y]/@transformation_type": "translation",
"AXISNAME[trans_y]/@vector": "@attrs:metadata/momentum_correction/adjust_params/y_vector",
"AXISNAME[trans_y]/@depends_on": "trans_x",
"AXISNAME[rot_z]": "@attrs:metadata/momentum_correction/adjust_params/angle",
"AXISNAME[rot_z]/@units": "degrees",
"AXISNAME[rot_z]/@transformation_type": "rotation",
"AXISNAME[rot_z]/@offset": "@attrs:metadata/momentum_correction/adjust_params/offset",
"AXISNAME[rot_z]/@vector": "@attrs:metadata/momentum_correction/adjust_params/rotation_vector",
"AXISNAME[rot_z]/@depends_on": "trans_y"
}
},
"/ENTRY[entry]/PROCESS_MPES[process]/energy_calibration":{
"coefficients": "@attrs:metadata/energy_correction/calibration/coefficients",
"coefficients/@units": "",
"fit_function": "@attrs:metadata/energy_correction/calibration/fit_function",
"original_axis": "@attrs:metadata/energy_correction/tof",
"original_axis/@units": "ns",
"calibrated_axis": "@attrs:metadata/energy_correction/calibration/axis",
"calibrated_axis/@units": "eV",
"physical_quantity": "energy"
},
"/ENTRY[entry]/PROCESS_MPES[process]/CALIBRATION[kx_calibration]": {
"scaling": "@attrs:metadata/momentum_correction/calibration/scale_kx",
"scaling/@units": "",
"offset": "@attrs:metadata/momentum_correction/offset_kx",
"offset/@units": "",
"calibrated_axis": "@attrs:metadata/momentum_correction/calibration/axis_kx",
"calibrated_axis/@units": "1/angstrom",
"physical_quantity": "momentum"
},
"/ENTRY[entry]/PROCESS_MPES[process]/CALIBRATION[ky_calibration]": {
"scaling": "@attrs:metadata/momentum_correction/calibration/scale_ky",
"scaling/@units": "",
"offset": "@attrs:metadata/momentum_correction/offset_ky",
"offset/@units": "",
"calibrated_axis": "@attrs:metadata/momentum_correction/calibration/axis_ky",
"calibrated_axis/@units": "1/angstrom",
"physical_quantity": "momentum"
},
"/ENTRY[entry]/data": {
"@axes": "@data:dims",
"@*_indices": "@data:*.index",
"@signal": "data",
"data": "@data:data",
"data/@units": "counts",
"*": "@data:*.data",
"*/@units": "@data:*.unit",
"energy/@type": "binding"
}
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ definitions:
m_annotations:
template:
reader: mpes
nxdl: NXmpes.nxdl
nxdl: NXmpes
eln:
hide: []
quantities:
......
core:
# Set verbosity of sed
verbose: True
# The loader to use. The mpes loader allows for loading hdf5 files from the METIS momentum microscope.
loader: mpes
# Option to use the copy tool to mirror data to a local storage location before processing.
use_copy_tool: False
# path to the root of the source data directory
copy_tool_source: "/path/to/data/"
# path to the root or the local data storage
copy_tool_dest: "/path/to/localDataStore/"
# optional keyworkds for the copy tool:
copy_tool_kwds:
# number of parallel copy jobs
ntasks: 20
# group id to set for copied files and folders
gid: 1001
dataframe:
# hdf5 group names to read from the h5 files (for mpes reader)
hdf5_groupnames: ["Stream_0", "Stream_1", "Stream_2", "Stream_4"]
# aliases to assign to the dataframe columns for the corresponding hdf5 streams
hdf5_aliases:
Stream_0: "X"
Stream_1: "Y"
Stream_2: "t"
Stream_4: "ADC"
# dataframe column name for the time stamp column
time_stamp_alias: "timeStamps"
# hdf5 group name containing eventIDs occuring at every millisecond (used to calculate timestamps)
ms_markers_group: "msMarkers"
# hdf5 attribute containing the timestamp of the first event in a file
first_event_time_stamp_key: "FirstEventTimeStamp"
# Time stepping in seconds of the succesive events in the timed dataframe
timed_dataframe_unit_time: 0.001
# list of columns to apply jitter to
jitter_cols: ["X", "Y", "t", "ADC"]
# dataframe column containing x coordinates
x_column: "X"
# dataframe column containing y coordinates
y_column: "Y"
# dataframe column containing time-of-flight data
tof_column: "t"
# dataframe column containing analog-to-digital data
adc_column: "ADC"
# dataframe column containing corrected x coordinates
corrected_x_column: "Xm"
# dataframe column containing corrected y coordinates
corrected_y_column: "Ym"
# dataframe column containing corrected time-of-flight data
corrected_tof_column: "tm"
# dataframe column containing kx coordinates
kx_column: "kx"
# dataframe column containing ky coordinates
ky_column: "ky"
# dataframe column containing energy data
energy_column: "energy"
# dataframe column containing delay data
delay_column: "delay"
# time length of a base time-of-flight bin in ns
tof_binwidth: 4.125e-12
# Binning factor of the tof_column-data compared to tof_binwidth (2^(tof_binning-1))
tof_binning: 2
# binning factor used for the adc coordinate (2^(adc_binning-1))
adc_binning: 3
# Default units for dataframe entries
units:
X: 'step'
Y: 'step'
t: 'step'
tof_voltage: 'V'
extractor_voltage: 'V'
extractor_current: 'A'
cryo_temperature: 'K'
sample_temperature: 'K'
dld_time: 'ns'
delay: 'ps'
timeStamp: 's'
energy: 'eV'
E: 'eV'
kx: '1/A'
ky: '1/A'
energy:
# Number of bins to use for energy calibration traces
bins: 1000
# Bin ranges to use for energy calibration curves (for tof_binning=0)
ranges: [128000, 138000]
# hdf5 path to attribute storing bias information for a given file
bias_key: "@KTOF:Lens:Sample:V"
# Option to normalize energy calibration traces
normalize: True
# Pixel range for smoothing
normalize_span: 7
# Spline order for smoothing
normalize_order: 1
# Radius parameter for fastdtw algorithm to find path correspondence
fastdtw_radius: 2
# Window around a peak to make sure that no other peaks are present
peak_window: 7
# Mehtod to use for energy calibration
calibration_method: "lmfit"
# Energy scale to use for energy calibration
energy_scale: "kinetic"
# Approximate position of the high-energy-cutoff in tof_column bins,
# used for displaying a graph to choose the energy correction function parameters.
tof_fermi: 132250
# TOF range to visualize for the correction tool around tof_fermi
tof_width: [-600, 1000]
# x-intergration range for the correction tool around the center pixel
x_width: [-20, 20]
# y-intergration range for the correction tool around the center pixel
y_width: [-20, 20]
# High intensity cutoff for the visulaization tool
color_clip: 300
correction:
# Correction type
correction_type: "Lorentzian"
# Correction amplitude
amplitude: 2.5
# center coordinates for the correction (in detector coordinates)
center: [730.0, 730.0]
# gamma value for the Lorentzian correction (same for x and y)
gamma: 920.0
# sigma value for the gaussian correction (same for x and y)
sigma: 700.0
# diameter value for the radial correction (same for x and y)
diameter: 3000.0
# Default energy calibration
calibration:
# time-of-flight distance (in m)
d: 1.058206295066418
# time offset (in ns)
t0: 7.684410678887588e-07
# energy offset (in eV)
E0: -30.440035779171833
# energy scale of calibration
energy_scale: "kinetic"
momentum:
# binning axes to use for momentum correction/calibration.
# Axes names starting with "@" refer to keys in the "dataframe" section
axes: ["@x_column", "@y_column", "@tof_column"]
# Bin numbers used for the respective axes
bins: [512, 512, 300]
# bin ranges to use (in unbinned detector coordinates)
ranges: [[-256, 1792], [-256, 1792], [132000, 136000]]
# The x/y pixel ranges of the detector
detector_ranges: [[0, 2048], [0, 2048]]
# The center pixel of the detector in the binned x/y coordinates
center_pixel: [256, 256]
# Sigma parameter for feature selection (intensity above background)
sigma: 5
# FWHM parameter for feature selection (width of features to extract)
fwhm: 8
# Sigma_radius parameter for feature selection (variation of radius size)
sigma_radius: 1
# default momentum calibration
calibration:
# x momentum scaleing factor
kx_scale: 0.010729535670610963
# y momentum scaleing factor
ky_scale: 0.010729535670610963
# x BZ center pixel
x_center: 256.0
# y BZ center pixel
y_center: 256.0
# x start value of the calibration dataset
rstart: -256.
# y start value of the calibration dataset
cstart: -256.
# x direction pixel stepping of the calibration dataset
rstep: 4.0
# y direction pixel stepping of the calibration dataset
cstep: 4.0
correction:
# default feature points used for calculating the distortion correction.
feature_points: [[203.2, 341.96], [299.16, 345.32], [350.25, 243.70], [304.38, 149.88], [199.52, 152.48], [154.28, 242.27], [248.29, 248.62]]
# rotational symmetry of the structure used for correction. Should be an even number
rotation_symmetry: 6
# Option whether the center of the structure is included in the feature points.
include_center: True
# Option whether the center should be included in the correction algorithm
use_center: True
delay:
# value ranges of the analog-to-digital converter axes used for encoding the delay stage position
# (in unbinned coordinates)
adc_range: [1900, 25600]
# hdf5 attribute containing the starting point of the delay stage
p1_key: "@trARPES:DelayStage:p1"
# hdf5 attribute containing the end point of the delay stage
p2_key: "@trARPES:DelayStage:p2"
# hdf5 attribute containing the t0 value of the delay stage
t0_key: "@trARPES:DelayStage:t0"
binning:
# Histogram computation mode to use.
hist_mode: "numba"
# Mode for hostogram recombination to use
mode: "fast"
# Whether to display a progress bar
pbar: True
# Number of parallel binning threads to use
num_cores: 20
# Number of multithreading threads per worker thread
threads_per_worker: 4
# API for numpy multithreading
threadpool_API: "blas"
histogram:
# number of bins used for histogram visualization
bins: [80, 80, 80, 80]
# default axes to use for histgram visualization.
# Axes names starting with "@" refer to keys in the "dataframe" section
axes: ["@x_column", "@y_column", "@tof_column", "@adc_column"]
# default ranges to use for histogram visualization (in unbinned detector coordinates)
ranges: [[0, 1800], [0, 1800], [128000, 138000], [0, 32000]]
metadata:
# URL of the epics archiver request engine
archiver_url: "http://aa0.fhi-berlin.mpg.de:17668/retrieval/data/getData.json?pv="
# EPICS channels to collect from EPICS archiver
epics_pvs: ["KTOF:Lens:Extr:I", "trARPES:Carving:TEMP_RBV", "trARPES:XGS600:PressureAC:P_RD", "KTOF:Lens:UDLD:V", "KTOF:Lens:Sample:V", "KTOF:Apertures:m1.RBV", "KTOF:Apertures:m2.RBV", "KTOF:Apertures:m3.RBV", "trARPES:Carving:TRX.RBV", "trARPES:Carving:TRY.RBV", "trARPES:Carving:TRZ.RBV", "trARPES:Carving:THT.RBV", "trARPES:Carving:PHI.RBV", "trARPES:Carving:OMG.RBV"]
# hdf5 attribute containing the field aperture "in" motor position
fa_in_channel: 'KTOF:Apertures:m1.RBV'
# hdf5 attribute containing the field aperture "hor" motor position
fa_hor_channel: 'KTOF:Apertures:m2.RBV'
# hdf5 attribute containing the contrast aperture "in" motor position
ca_in_channel: 'KTOF:Apertures:m3.RBV'
# dictionary containing contrast and field aperture motor positions and sizes
aperture_config:
"2018-01-23T19:35:15":
fa_size:
'750': [[-3.0, -1.4], [-5.4, -4.6]]
grid: [[-3.0, -1.4], [0.15, 1.75]]
'1500': [[-3.0, -1.4], [6.25, 7.75]]
'200': [[3.3, 4.4], [-5.4, -4.6]]
'500': [[3.3, 4.4], [0.15, 1.75]]
'1000': [[3.3, 4.4], [6.25, 7.75]]
'20': [[9.6, 10.1], [-5.4, -4.6]]
'50': [[9.6, 10.1], [0.15, 1.75]]
'100': [[9.6, 10.1], [6.25, 7.75]]
open: [[-15, -9.0], [-15, -8.9]]
ca_size:
'50': [8.0, 8.4]
'200': [-0.5, -0.9]
'100': [3.4, 3.8]
grid: [-5.3, -5.9]
open: [-12.0, -8]
"2020-01-23T19:35:15":
fa_size:
'750': [[-6.2, -4.8], [5.0, 6.0]]
grid: [[-6.2, -4.8], [-0.7, -0.3]]
'500': [[-6.2, -4.8], [-7.0, -6.0]]
'200': [[0.5, 0.9], [-0.7, -0.3]]
'100': [[0.5, 0.9], [-7.0, -6.0]]
'300': [[0.5, 0.9], [5.0, 6.0]]
'10': [[6.5, 6.9], [-7.0, -6.0]]
'20': [[6.5, 6.9], [-0.7, -0.3]]
'50': [[6.5, 6.9], [5.0, 6.0]]
open: [[-15, -8.5], [-15, -8.9]]
ca_size:
'50': [9.0, 11.0]
'300': [-0.1, 0.1]
'200': [0.7, 1.5]
'100': [5.1, 5.9]
grid: [-5.5, -5.2]
open: [-15, -8.5]
# dictionary containing lens mode configurations
lens_mode_config:
"6kV_kmodem4.0_20VTOF_v3.sav":
Extr: 6000.0
UCA: 1200
UFA: 600.0
Z1: 2452.9
Z2: 1489.9
A: 420.07
B: 2494.8
C: 489.2
D: 228.05
E: 113.82
F: 54.232
G: 20.0
H: 25.5
I: 36.0
TOF: 20.0
MCPfront: 20.0
"6kV_kmodem4.0_30VTOF_453ns_focus.sav":
Extr: 6000.0
UCA: 1200
UFA: 600.0
Z1: 2452.9
Z2: 1489.9
A: 403.07
B: 2500
C: 422.25
D: 208.88
E: 199.49
F: 68.735
G: 30.0
H: 30.0
I: 44.5
TOF: 30.0
MCPfront: 30.0
nexus:
# pynxtools reader to use for saving NXmpes files
reader: "mpes"
# NeXus application definition to use for saving
definition: "NXmpes"
# List conatining additional input files to be handed to the pynxtools converter tool,
# e.g. containing a configuration file, and additional metadata.
input_files: ["config_file.json"]
......@@ -2,9 +2,9 @@
"data":{
"m_def":"../upload/raw/xps.scheme.archive.yaml#/definitions/section_definitions/0",
"reader":"xps",
"nxdl":"NXmpes.nxdl",
"nxdl":"NXmpes",
"input_files":[
"EX439_S718_Au.sle",
"EX439_S718_Au_in_25_mbar_O2.sle",
"eln_data.yaml"
],
"output": "Au_25_mbar_O2_no_align.nxs",
......@@ -192,4 +192,4 @@
}
}
}
}
\ No newline at end of file
}