Parallel2dGeometry.rotation_matrix¶
-
Parallel2dGeometry.
rotation_matrix
(self, angle)[source]¶ Return the rotation matrix to the system state at
angle
.For an angle
phi
, the matrix is given byrot(phi) = [[cos(phi), -sin(phi)], [sin(phi), cos(phi)]]
- Parameters
- anglefloat or
array-like
Angle(s) in radians describing the counter-clockwise rotation of the detector.
- anglefloat or
- Returns
- rot
numpy.ndarray
The rotation matrix (or matrices) mapping vectors at the initial state to the ones in the state defined by
angle
. The rotation is extrinsic, i.e., defined in the “world” coordinate system. Ifangle
is a single parameter, the returned array has shape(2, 2)
, otherwiseangle.ndim + (2, 2)
.
- rot