Skip to content

Commit

Permalink
remove also source_pump etc. if not applied
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Feb 27, 2025
1 parent f716b77 commit 5a8fe95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/specsscan/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,14 @@ def fetch_elab_metadata(self, scan: int, metadata: dict) -> dict:
if metadata["elabFTW"]["scan"].get("pump_status", "closed") == "closed":
if "pump_photon_energy" in metadata["elabFTW"].get("laser_status", {}):
del metadata["elabFTW"]["laser_status"]["pump_photon_energy"]
if "pump_repetition_rate" in metadata["elabFTW"].get("laser_status", {}):
del metadata["elabFTW"]["laser_status"]["pump_repetition_rate"]

if metadata["elabFTW"]["scan"].get("pump2_status", "closed") == "closed":
if "pump2_photon_energy" in metadata["elabFTW"].get("laser_status", {}):
del metadata["elabFTW"]["laser_status"]["pump2_photon_energy"]
if "pump2_repetition_rate" in metadata["elabFTW"].get("laser_status", {}):
del metadata["elabFTW"]["laser_status"]["pump2_repetition_rate"]

return metadata

Expand Down

0 comments on commit 5a8fe95

Please sign in to comment.