Parallel3dEulerGeometry.rotation_matrix

Parallel3dEulerGeometry.rotation_matrix(angles)[source]

Return the rotation matrix to the system state at angles.

Parameters:
anglesarray-like or sequence

Euler angles in radians describing the rotation of the detector. The length of the provided argument (along the first axis in case of an array) must be equal to the number of Euler angles in this geometry.

Returns:
rotnumpy.ndarray

Rotation matrix (or matrices) mapping vectors at the initial state to the ones in the state defined by angles. The rotation is extrinsic, i.e., defined in the "world" coordinate system. If angles is a single pair (or triplet) of Euler angles, an array of shape (3, 3) representing a single matrix is returned. Otherwise, the shape of the returned array is broadcast(*angles).shape + (3, 3).