scippneutron.conversion.beamline.beam_aligned_unit_vectors#
- scippneutron.conversion.beamline.beam_aligned_unit_vectors(incident_beam, gravity)[source]#
Return unit vectors for a coordinate system aligned with the incident beam.
The unit vectors are
where
is theincident_beam
and is the gravity vector. See the module-level docs ofscippneutron.conversion.beamline
for details.- Parameters:
- Returns:
BeamAlignedUnitVectors
– A dict containing the unit vectors with keys'ex'
,'ey'
, and'ez'
- Raises:
ValueError – If the incident beam is parallel to gravity. The rotation of the x-z plane is ill-define din this case.
See also
straight_incident_beam
Compute the incident beam for a straight beamline.