Add pgm focus const - #39
Open
Jun Aishima (JunAishima) wants to merge 3 commits into
Open
Conversation
Jun Aishima (JunAishima)
requested review from
Abby Giles (AbbyGi)
and
a lite review from Copilot
September 3, 2026 19:38
Copilot started reviewing on behalf of
Jun Aishima (JunAishima)
September 3, 2026 19:39
View session
There was a problem hiding this comment.
🟢 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_Constto the baseline variables fetched from Tiled. - If present, write
PGM_Focus_Constinto the NeXus file asentry/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 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 started reviewing on behalf of
Jun Aishima (JunAishima)
September 3, 2026 19:44
View session
Comment on lines
+228
to
+231
| if "PGM_Focus_Const" in values: | ||
| nxfile.entry.instrument.monochromator.c_value = nx.NXfield( | ||
| values["PGM_Focus_Const"] | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: