scippneutron.conversion.beamline#

Functions for computing coordinates related to beamline geometry.

Most functions in this module assume a straight beamline geometry. That is, the beams are not curved by, e.g., a beam guide. All quantities are defined as in the image below:

Scattering angle in Bragg reflection.

The ‘source position’ defines the point where \(t=0\) (or vice versa). Neutrons are scattered at the ‘sample position’ and detected at ‘position’ at \(t=\mathsf{tof}\).

In addition, total_straight_beam_length_no_scatter can be used if the beam does not scatter off of a sample. This is useful for instance for monitors. In this case, Ltotal is the distance from source to detector.

Functions

L1(*, incident_beam)

Compute the length of the incident beam.

L2(*, scattered_beam)

Compute the length of the scattered beam.

straight_incident_beam(*, source_position, ...)

Compute the length of the beam from source to sample.

straight_scattered_beam(*, position, ...)

Compute the length of the beam from sample to detector.

total_beam_length(*, L1, L2)

Compute the combined length of the incident and scattered beams.

total_straight_beam_length_no_scatter(*, ...)

Compute the length of the beam from source to given position.

two_theta(*, incident_beam, scattered_beam)

Compute the scattering angle between scattered and transmitted beams.