Parallel3dEulerGeometry.rotation_matrix¶
-
Parallel3dEulerGeometry.
rotation_matrix
(self, angles)[source]¶ Return the rotation matrix to the system state at
angles
.- Parameters
- angles
array-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.
- angles
- Returns
- rot
numpy.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. Ifangles
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 isbroadcast(*angles).shape + (3, 3)
.
- rot