detector_rotation_matrix#

anri.geom.detector_rotation_matrix(tilt_x, tilt_y, tilt_z)[source]#

Return a 3D orientation matrix that transforms a point in the detector reference frame to the lab frame.

Adapted from ImageD11.transform.detector_rotation_matrix(). Applies rotations in order (Z,Y,X).

Parameters:
  • tilt_x (float) – Tilt of the detector around lab x vector (right-handed rotation) in radians.

  • tilt_y (float) – Tilt of the detector around lab y vector (right-handed rotation) in radians.

  • tilt_z (float) – Tilt of the detector around lab z vector (right-handed rotation) in radians.

Returns:

jax.Array – [3,3] Rotation matrix

Notes

We have \(\matr{R} = \matr{R_x} \matr{R_y} \matr{R_z}\) around \(x,y,z\) respectively.