Skip to content

Commit 840a8d9

Browse files
authored
Merge pull request #567 from OpenCOMPES/update_pynxtools
Update pynxtools
2 parents f1bb527 + c62d1a1 commit 840a8d9

13 files changed

+781
-260
lines changed

.cspell/custom-dictionary.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,17 @@ dtype
9999
dtypes
100100
easimon
101101
ecalibdict
102-
electronanalyser
102+
elab
103+
elabapi
104+
elabid
105+
electronanalyzer
103106
Elektronen
104107
endstation
105108
energycal
106109
energycalfolder
107110
ENERGYDISPERSION
108111
ENOSPC
112+
entityid
109113
equiscale
110114
Eref
111115
errorbar
@@ -266,6 +270,7 @@ ontop
266270
OPCPA
267271
openmp
268272
OPTICALDELAY
273+
orcid
269274
otherax
270275
packetcoders
271276
Pandoc
@@ -340,6 +345,7 @@ sdir
340345
segs
341346
setp
342347
sfile
348+
sharelink
343349
shutil
344350
Sixten
345351
sohail
@@ -373,6 +379,7 @@ toctree
373379
tofseg
374380
tqdm
375381
traceseg
382+
trarpes
376383
trseg
377384
Tsec
378385
txtsize
@@ -385,6 +392,7 @@ ufunc
385392
unbinned
386393
uncategorised
387394
undoc
395+
userid
388396
utime
389397
varnames
390398
venv

docs/sed/loader.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ MpesLoader
2929
:members:
3030
:undoc-members:
3131

32+
.. automodule:: sed.loader.mpes.metadata
33+
:members:
34+
:undoc-members:
35+
3236
FlashLoader
3337
###################################################
3438
.. automodule:: sed.loader.flash.loader

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ classifiers = [
2929
"Operating System :: OS Independent",
3030
]
3131
dependencies = [
32-
"bokeh>=2.4.2",
32+
"bokeh>=2.4.2,<3.7.0",
3333
"dask>=2021.12.0,<2024.8",
34+
"elabapi-python>=5.0",
3435
"fastdtw>=0.3.4",
3536
"h5py>=3.6.0",
3637
"ipympl>=0.9.1",
@@ -43,8 +44,8 @@ dependencies = [
4344
"pandas>=1.4.1",
4445
"photutils<2.0",
4546
"psutil>=5.9.0",
46-
"pynxtools-mpes>=0.2.0",
47-
"pynxtools>=0.9.0",
47+
"pynxtools-mpes>=0.2.2",
48+
"pynxtools>=0.10.1",
4849
"pyyaml>=6.0.0",
4950
"scipy>=1.8.0",
5051
"symmetrize>=0.5.5",
@@ -95,8 +96,8 @@ all = [
9596

9697
[tool.coverage.report]
9798
omit = [
98-
"config.py",
99-
"config-3.py",
99+
"./config.py",
100+
"./config-3.py",
100101
]
101102

102103
[tool.ruff]

src/sed/calibrator/momentum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,9 +2004,9 @@ def gather_calibration_metadata(self, calibration: dict = None) -> dict:
20042004
metadata["calibration"] = calibration
20052005
# create empty calibrated axis entries, if they are not present.
20062006
if "kx_axis" not in metadata["calibration"]:
2007-
metadata["calibration"]["kx_axis"] = 0
2007+
metadata["calibration"]["kx_axis"] = 0.0
20082008
if "ky_axis" not in metadata["calibration"]:
2009-
metadata["calibration"]["ky_axis"] = 0
2009+
metadata["calibration"]["ky_axis"] = 0.0
20102010

20112011
return metadata
20122012

src/sed/config/NXmpes_config-HEXTOF.json

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"/ENTRY[entry]/experiment_institution": "Deutsches Elektronen-Synchrotron DESY",
77
"/ENTRY[entry]/experiment_facility": "Free-Electron Laser FLASH",
88
"/ENTRY[entry]/experiment_laboratory": "@attrs:metadata/creationLocation",
9-
"/ENTRY/entry_identifier": {
10-
"identifier":"@attrs:metadata/pid"
11-
},
9+
"/ENTRY/identifierNAME[entry_identifier]": "@attrs:metadata/pid",
1210
"/ENTRY[entry]/USER[user0]": {
1311
"name": "!@attrs:metadata/principalInvestigator",
1412
"role": "Principal investigator",
@@ -48,7 +46,7 @@
4846
"value/@units": "@attrs:metadata/scientificMetadata/sample/sample_pressure/unit"
4947
}
5048
},
51-
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]": {
49+
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYZER[electronanalyzer]": {
5250
"description": "HEXTOF Momentum Microscope",
5351
"device_information": {
5452
"vendor": "None",
@@ -78,7 +76,7 @@
7876
"type": "estimated"
7977
}
8078
},
81-
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/COLLECTIONCOLUMN[collectioncolumn]": {
79+
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYZER[electronanalyzer]/COLLECTIONCOLUMN[collectioncolumn]": {
8280
"projection": "@attrs:metadata/scientificMetadata/Collection/projection",
8381
"scheme": "momentum dispersive",
8482
"lens_mode": "@attrs:metadata/scientificMetadata/Collection/lens_mode",
@@ -107,19 +105,18 @@
107105
}
108106
}
109107
},
110-
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/ENERGYDISPERSION[energydispersion]": {
108+
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYZER[electronanalyzer]/ENERGYDISPERSION[energydispersion]": {
111109
"pass_energy": "@attrs:metadata/scientificMetadata/Collection/tof_voltage",
112110
"pass_energy/@units": "V",
113111
"scheme": "tof",
114112
"tof_distance": 0.8,
115113
"tof_distance/@units": "m"
116114
},
117-
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYSER[electronanalyser]/DETECTOR[detector]": {
115+
"/ENTRY[entry]/INSTRUMENT[instrument]/ELECTRONANALYZER[electronanalyzer]/ELECTRON_DETECTOR[detector]": {
118116
"amplifier_type": "MCP",
119-
"detector_type": "DLD",
120-
"sensor_pixels": [2024, 2048]
117+
"detector_type": "DLD"
121118
},
122-
"/ENTRY[entry]/INSTRUMENT[instrument]/sourceTYPE[source_probe]": {
119+
"/ENTRY[entry]/INSTRUMENT[instrument]/source_probe": {
123120
"name": "@attrs:metadata/scientificMetadata/Source/name",
124121
"probe": "@attrs:metadata/scientificMetadata/Source/probe",
125122
"type": "@attrs:metadata/scientificMetadata/Source/type",
@@ -128,7 +125,7 @@
128125
"frequency/@units": "@attrs:metadata/scientificMetadata/Source/repetition_rate/unit",
129126
"associated_beam": "/entry/instrument/beam_probe"
130127
},
131-
"/ENTRY[entry]/INSTRUMENT[instrument]/beamTYPE[beam_probe]": {
128+
"/ENTRY[entry]/INSTRUMENT[instrument]/beam_probe": {
132129
"distance": 0.0,
133130
"distance/@units": "mm",
134131
"incident_energy": "@attrs:metadata/scientificMetadata/Source/photon_energy/value",
@@ -146,16 +143,16 @@
146143
"energy_dispersion": "@attrs:metadata/scientificMetadata/Source/dispersion/value",
147144
"energy_dispersion/@units": "@attrs:metadata/scientificMetadata/Source/dispersion/unit"
148145
},
149-
"/ENTRY[entry]/INSTRUMENT[instrument]/sourceTYPE[source_pump]": {
146+
"/ENTRY[entry]/INSTRUMENT[instrument]/source_pump": {
150147
"name": "PIGLET @ FLASH @ DESY",
151148
"probe": "visible light",
152149
"type": "Optical Laser",
153150
"mode": "Single Bunch",
154-
"frequency": 1000,
151+
"frequency": 1000.0,
155152
"frequency/@units": "kHz",
156153
"associated_beam": "/entry/instrument/beam_pump"
157154
},
158-
"/ENTRY[entry]/INSTRUMENT[instrument]/beamTYPE[beam_pump]": {
155+
"/ENTRY[entry]/INSTRUMENT[instrument]/beam_pump": {
159156
"distance": 0.0,
160157
"distance/@units": "mm",
161158
"incident_wavelength": "@attrs:metadata/scientificMetadata/Laser/wavelength/value",
@@ -195,7 +192,7 @@
195192
"gas_pressure_env": {
196193
"pressure_gauge": "@link:/entry/instrument/pressure_gauge"
197194
},
198-
"bias": {
195+
"bias_env": {
199196
"voltmeter": "@link:/entry/instrument/manipulator/sample_bias_voltmeter"
200197
}
201198
},
@@ -207,6 +204,6 @@
207204
"data/@units": "counts",
208205
"AXISNAME[*]": "@data:*.data",
209206
"AXISNAME[*]/@units": "@data:*.unit",
210-
"energy/@type": "@attrs:metadata/energy_calibration/calibration/energy_scale"
207+
"AXISNAME[energy]/@type": "@attrs:metadata/energy_calibration/calibration/energy_scale"
211208
}
212209
}

0 commit comments

Comments
 (0)