-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use scattering angle function from ScippNeutron #54
Comments
I believe I found a bug in the current implementation. We currently define
This definition means that the y axis points down. I.e., positive y values are below the incoming beam and negative values above the incoming beam. We then compute the point where the neutron would have been detected without gravity as This equation is identical to that in SANS (scattering_angles_with_gravity). However, in SANS, we define (note the minus sign!) see https://github.com/scipp/scippneutron/blob/1a1c86a65fb69c727f4c28bef05d8a063e66bb2f/src/scippneutron/conversion/beamline.py#L384 The definition in SANS makes sense. It means that the direction the neutron was scattered in ( This may not have been noticed before because we use an absolute value of Has this been compared to Mantid? @jokasimr, @arm61 do you agree with this? |
Yes it looks like this could be an issue. The results have not been compared to mantid. But they have been compared to Jochens program, and there we see a clear discrepance in the form of a shift to lower However, the (possible) gravity correction bug here is not enough to explain the discrepancy. |
Similarly to scipp/esssans#143, use some code in
scippneutron.conversion.beamline
to computetheta
. We can't just usescattering_angles_with_gravity
because in reflectometry, we define the scattering angle w.r.t. the sample plane, not the beam direction. Compared to SANS, this means that we ignore thex
component iny_prime
for two_theta.The text was updated successfully, but these errors were encountered: