Repository navigation
[essreduce] Fix loading monitors with auxiliary signals (KeyError: 'frame_total') - #800
Merged
Merged
Conversation
_NXdataWithoutAuxSignals removed the frame_total and reference_time children but kept the auxiliary_signals attribute naming them, so ScippNeXus failed with KeyError: 'frame_total' on monitors written by the current file writer. Fixes #797 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nvaytet
approved these changes
Oct 15, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
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.
Fixes #797.
Monitors written by the current file writer have an
auxiliary_signals=['frame_total']attribute on theirNXdatagroup._NXdataWithoutAuxSignalsremoved theframe_totalandreference_timechildren but kept that attribute, so ScippNeXus looked up the removed child andGenericNeXusWorkflowfailed withKeyError: 'frame_total'. The attribute is now removed together with the children.This affects DREAM, NMX and BIFROST histogram monitors in the current coda files, and the LoKI monitors in older files. Workflows that use these monitors, e.g. DREAM reduction with monitor normalization, failed on such files.
The existing histogram-monitor test uses an older DREAM file without auxiliary signals, so the new test writes a small file with the current layout.
Note for #785: its monitor tests expect the fallback warnings caused by this bug and will need updating once this is merged.
Test plan: new unit test (fails on
mainwith theKeyError); loaded DREAMmonitor_bunker/monitor_cave, NMXbeam_monitor_1and BIFROSTbandwidth_monitor/overlap_monitor/psc_monitorfrom the 2026-10-13 coda drop, all of which now load with positions.🤖 Generated with Claude Code