Rhs chopper#1610
Open
ggoneiESS wants to merge 3 commits into
Open
Conversation
Contributor
|
From Telco Apr 29, this looks fine. Is there a way in NeXus to specify a default for an enumeration? Right now, the description says the default is 'Left' but this isn't in the XML itself. |
phyy-nx
requested changes
May 27, 2026
| <field name="handedness"> | ||
| <doc> | ||
| Direction of measurement for rotation and positions in the disk-chopper. | ||
| Left is the default for historical reasons and implies positive rotation and angles in an anticlockwise |
Contributor
There was a problem hiding this comment.
Suggested change
| Left is the default for historical reasons and implies positive rotation and angles in an anticlockwise | |
| Left was assumed in the past and implies positive rotation and angles in an anticlockwise |
| direciton when facing away from the source. | ||
| Right matches the default NeXus coordinate system and implies positive rotation and angles in an anticlockwise | ||
| direction when looking towards the source - positive rotation matches the positive roll of the system. | ||
| Only one from the enumerated list (match text exactly). |
Contributor
There was a problem hiding this comment.
Suggested change
| Only one from the enumerated list (match text exactly). | |
| Only one from the enumerated list (match text exactly). If `handness` is not specified, it's likely that downstream consuming applications will assume left-handed. |
| <doc> | ||
| Direction of measurement for rotation and positions in the disk-chopper. | ||
| Left is the default for historical reasons and implies positive rotation and angles in an anticlockwise | ||
| direciton when facing away from the source. |
Contributor
There was a problem hiding this comment.
Suggested change
| direciton when facing away from the source. | |
| direction when facing away from the source. |
Contributor
|
@ggoneiESS after the above comments are addressed, from Telco May 27 we can move this to a 2-week online vote. Thanks! |
Contributor
|
"power cycled" to try and get the CI to run correctly. |
phyy-nx
requested changes
May 27, 2026
| <doc> | ||
| Chopper rotation speed. Positive for anticlockwise rotation when | ||
| facing away from the source, negative otherwise. | ||
| Chopper rotation speed. |
Contributor
There was a problem hiding this comment.
Suggested change
| Chopper rotation speed. | |
| Chopper rotation speed, in the convention of the handedness of the chopper. |
Contributor
There was a problem hiding this comment.
Note, it's a bit odd that the user can specify a negative rotation speed to bypass the handedness. Is that the convention in neutrons?
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.
The handedness of the NeXus coordinate system implies that chopper rotation should be positive when rotating clockwise facing away from the source, but the documentation states it is the exact opposite.
This cannot be corrected easily historically, as many systems should have this in place, but it is not correct to describe NeXus as using a right-handed coordinate system with this discrepancy. It also leads to an unintuitive and ugly exception when describing an instrument.
This PR proposes a fix by including a new field,
handedness, that defaults toLeftunless otherwise specified, thus not breaking any existing setups or data files, but allows for another value,Right, which agrees with the standard NeXus coordinate basis and which arises naturally when defining a RHS with a z-axis that runs in a positive direction from source to sample.