Repository navigation
[essreduce] Fix loading monitors whose transformation chain has no translation - #799
Merged
Merged
Conversation
A monitor with depends_on='.' (or only rotations) has a dimensionless transform. get_calibrated_monitor took the position unit from the transform, so adding the offset in metres raised a UnitError. Use the offset's unit in that case. Fixes #798 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SimonHeybrock
commented
Oct 13, 2026
A transform with unit None does not reach get_calibrated_monitor, and a translation with a bad unit fails earlier when the chain is resolved. State this in the comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nvaytet
approved these changes
Oct 15, 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 #798.
GenericNeXusWorkflowcould not load a monitor whose transformation chain contains no translation, e.g.depends_on='.'. Such a transform is dimensionless, andget_calibrated_monitortook the unit of the position from it, so adding the offset (in metres) raised aUnitError. The position is now computed in the unit of the offset in that case.This affects all FREIA monitors and MAGIC
beam_monitor_1in the current coda files. The FREIAmultiblade_detector(alsodepends_on='.') was not affected because detectors go throughcompute_detector_position, which already handles this.Test plan: new unit test; loaded the FREIA (
monitor_1..3,MISSING_ESSCONFIG_monitor_4) and MAGIC (beam_monitor_1) monitors from the 2026-10-13 coda drop, which fail onmainand load at the origin with this change.🤖 Generated with Claude Code