Skip to content
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

Ensure two-theta calculation with gravity works if incoming beam is not perpendicular to gravity #531

Closed
SimonHeybrock opened this issue Jul 10, 2024 · 5 comments · Fixed by #544
Assignees

Comments

@SimonHeybrock
Copy link
Member

Related to scipp/essreflectometry#14.

@jl-wynen
Copy link
Member

This may be easy:

  1. Remove y-component of incoming_beam to define z-axis.
  2. Use gravity to define the y-axis.
  3. Compute angle between incoming_beam and x-z-plane.
  4. Compute theta based on x-y-z-system and subtract above angle.

@SimonHeybrock
Copy link
Member Author

Remove y-component of incoming_beam to define z-axis.

... assuming we never have a beam that is (approx) along y?

@jl-wynen
Copy link
Member

Remove y-component of incoming_beam to define z-axis.

... assuming we never have a beam that is (approx) along y?

Yes. We could have a safety check to disallow beams below a certain angle from the y-axis.

Do you think this is an issue in practice? This issue is mostly about reflectometry. Given specular reflection and a beam coming down the y-axis, this would mean that the detector is also position along the y-axis, i.e., in the incoming beam.

@SimonHeybrock
Copy link
Member Author

Do you think this is an issue in practice? This issue is mostly about reflectometry. Given specular reflection and a beam coming down the y-axis, this would mean that the detector is also position along the y-axis, i.e., in the incoming beam.

My thought was that someone might define Z as "up". Adding a simple check (say about the length of the incoming beam after removing Y?) should be sufficient?

@jl-wynen
Copy link
Member

Ok. Then you can project the incoming beam onto a plane perpendicular to gravity. Since we only care about the direction, not the length, this should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants