-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add Qx #188
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
feat: add Qx #188
Conversation
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.
Implementation looks good. But can you add the equation to the docstring. That makes it easier to read without having to understand code (and Scipp idiosyncrasies like dtype conversions).
src/ess/estia/conversions.py
Outdated
| is the incident angle on the sample surface. | ||
| Assuming the sample is aligned with the beam the incident angle is what | ||
| we call the sample rotation. |
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.
What do you mean by 'aligned' here? I understand that word to mean that the beam is in the sample plane, i.e., the incident angle is 0. Is sample_rotation defined as the incident angle? If so, just use that here!
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.
What do you mean by 'aligned' here? I understand that word to mean that the beam is in the sample plane, i.e., the incident angle is 0
Yes you're right, this is unclear.
In this context, what I mean by "aligned with the beam" is exactly that rotation_angle equals the angle of incidence on the sample (which makes the statement above a bit circular).
But I thought it is good for the user to be aware that we make this assumption.
Maybe it would be good to introduce a quantity called angle_of_incidence, to clearly distinguish that from sample_rotation.
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.
Could do.
Personally, I'm quite partial to using images to show these quantities. Basically, a modification of the images in https://scipp.github.io/scippneutron/user-guide/coordinate-transformations.html would be useful here. Maybe we should add them somewhere centrally in the ESSreflectometry docs. Especially since some definitions differ from ScippNeutron.
Co-authored-by: Jan-Lukas Wynen <j-l.wynen@hotmail.de>
See second entry in https://confluence.ess.eu/spaces/LSS/pages/788709987/Estia+Reduction+Use+Cases.
Instrument scientist has reviewed the implementation.
Best would be to test this by using it to reduce some offspecular dataset that was measured using a collimated beam in the ESTIA McStas instrument.
But currently we don't have that.