-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for instrument view axes orientation. #38593
base: main
Are you sure you want to change the base?
Conversation
I think this will change the orientation for every instrument, are they all wrong, or just BIOSANS? |
@@ -287,7 +287,7 @@ void Projection3D::componentSelected(size_t componentIndex) { | |||
Quat rot; | |||
try { | |||
const auto compDir = normalize(pos - componentInfo.samplePosition()); | |||
V3D up(0, 0, 1); | |||
V3D up(0, 1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be more robust to use the instrument's defaults/reference-frame/pointing-up#axis
field (BIOSANS example)? I admit that only POLREF doesn't choose y, but it looks like it is supposed to be configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that the Instrument::getReferenceFrame()
doesn't come into play here. I don't see how one accesses it from the Project3D
either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That changes only the "Instrument"-->"detector1" view and "Instrument"-->"detector1"-->"bank" view
The "Instrument" view is not affected.
For BIOSANS:
"detector1" view current:
"detector1" view proposed:
Banks view current:
Banks view proposed:
For EQSANS
"detector1" view current:
"detector1" proposed view:
Banks view current:
Banks view proposed:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, can I obtain somehow your file for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run LoadEmptyInstrument
with InstrumentName="MARI"
, but all the instruments will be affected, I only used MARI as an example because that happened to be the last file I loaded in Workbench.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I assume the second image is the current implementation. The green axis on the first image points up as in all other (fixed) situations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may not have all the background to this, but I agree with @peterfpeterson that the best solution that is general for all instrument is to use the reference frame in the IDF? There are instances like here
where
But is the problem that you don't have access to the instrument? |
I note there are couple of other places in the code where a direction for vertical is hard-coded e.g.
|
The release note structure for v6.13 has been created. You can now rebase your branch and move the release note in this PR. |
Description of work
8875: [MANTID] The display of BIOSANS "detector1" in Mantid's instrument-viewer has an incorrect orientation
Summary of work
The function which calculates 3D projections of instrument components was modified.
Further detail of work
To test:
Open a run file, select tab "Instrument" , and "detector1". The Y-axis should point up.
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.