Skip to content

Commit 3fb7d77

Browse files
authored
Merge pull request #576 from OpenCOMPES/calculate_temporal_resolution
Calculate temporal resolution
2 parents 7171ce7 + 553a286 commit 3fb7d77

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/sed/loader/mpes/metadata.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,17 @@ def fetch_elab_metadata(self, runs: list[str], metadata: dict) -> dict:
319319
float(metadata["elabFTW"]["laser_status"]["probe_profile_y"]),
320320
]
321321

322+
# calculate temporal resolution
323+
if (
324+
"laser_status" in metadata["elabFTW"]
325+
and "pump_pulse_duration" in metadata["elabFTW"]["laser_status"]
326+
and "probe_pulse_duration" in metadata["elabFTW"]["laser_status"]
327+
):
328+
metadata["elabFTW"]["laser_status"]["temporal_resolution"] = np.sqrt(
329+
metadata["elabFTW"]["laser_status"]["pump_pulse_duration"] ** 2
330+
+ metadata["elabFTW"]["laser_status"]["probe_pulse_duration"] ** 2,
331+
)
332+
322333
# fix preparation date
323334
if "sample" in metadata["elabFTW"] and "preparation_date" in metadata["elabFTW"]["sample"]:
324335
metadata["elabFTW"]["sample"]["preparation_date"] = (

0 commit comments

Comments
 (0)