Skip to content

Commit

Permalink
added ring current to export
Browse files Browse the repository at this point in the history
  • Loading branch information
cjtitus committed Nov 8, 2024
1 parent b6688d7 commit c3f82a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion export_to_xdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ def get_config(config, keys, default=None):


def get_xdi_run_header(run):
baseline = run.baseline.data.read()
metadata = {}
metadata["Facility.name"] = "NSLS-II"
metadata["Facility.xray_source"] = "EPU60 Undulator"
metadata["Facility.current"] = float(get_with_fallbacks(baseline, "NSLS-II Ring Current", default=[400])[0])

metadata["Beamline.name"] = "7-ID-1"
metadata["Beamline.chamber"] = "NEXAFS"
Expand All @@ -41,7 +43,7 @@ def get_xdi_run_header(run):
metadata["Proposal.cycle"] = run.start.get("cycle", "")
metadata["Proposal.start"] = run.start.get("start_datetime", "")

baseline = run.baseline.data.read()

metadata["Motors.exslit"] = float(
get_with_fallbacks(baseline, "eslit", "Exit Slit of Mono Vertical Gap", default=[0])[0]
)
Expand Down

0 comments on commit c3f82a6

Please sign in to comment.