Skip to content

Add pgm focus const - #39

Open
Jun Aishima (JunAishima) wants to merge 3 commits into
NSLS2:mainfrom
JunAishima:add-pgm-focus-const
Open

Add pgm focus const#39
Jun Aishima (JunAishima) wants to merge 3 commits into
NSLS2:mainfrom
JunAishima:add-pgm-focus-const

Conversation

@JunAishima

Copy link
Copy Markdown
Contributor

Add this item from baseline, only the latter value (if more than 1).

Since similar values are already being put into the Nexus file (baseline, single value), no significant changes are necessary to handle it.

This has been shown to work for a couple of runs at the ARPES endstation in the truncated output:

...
88 -rwxr-x---+ 1 workflow-esm pass-320795 84913 Sep  3 15:12 T_0021.nxs
...
> h5ls -r T_0021.nxs

...
/entry/instrument/monochromator/c_value Dataset {SCALAR}
...

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The functional change is small and consistent with existing metadata-export patterns; the only feedback is a minor formatting fix for readability.

Pull request overview

This PR extends the NeXus metadata export to include the PGM focus constant from baseline metadata and write it into the monochromator group (/entry/instrument/monochromator/c_value) in the output .nxs file.

Changes:

  • Add PGM_Focus_Const to the baseline variables fetched from Tiled.
  • If present, write PGM_Focus_Const into the NeXus file as entry/instrument/monochromator/c_value.
File summaries
File Description
metadata_exporter.py Reads PGM_Focus_Const from baseline and exports it into the NeXus monochromator group as c_value.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread metadata_exporter.py Outdated
Comment on lines +228 to +231
if "PGM_Focus_Const" in values:
nxfile.entry.instrument.monochromator.c_value = nx.NXfield(
values["PGM_Focus_Const"]
)
 * make more consistent
Copilot AI review requested due to automatic review settings September 3, 2026 19:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is small and consistent with the existing metadata export pattern, with only a minor maintainability nit noted.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread metadata_exporter.py
Comment on lines +228 to +231
if "PGM_Focus_Const" in values:
nxfile.entry.instrument.monochromator.c_value = nx.NXfield(
values["PGM_Focus_Const"]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants