synthpop.synthpop_utils.utils_functions
This file contains several utils function
Functions
|
|
|
|
|
creates the rotation matrix along a given axis. |
Module Contents
- synthpop.synthpop_utils.utils_functions.solidangle_to_half_cone_angle(solid_angle)
- synthpop.synthpop_utils.utils_functions.half_cone_angle_to_solidangle(cone_angle)
- synthpop.synthpop_utils.utils_functions.rotation_matrix(theta_rad: float or np.ndarray or None = None, st: float or np.ndarray or None = None, ct: float or np.ndarray or None = None, axis: str = '') numpy.ndarray
creates the rotation matrix along a given axis. These are:
1 0 0 |- RX = | 0 cos -sin |
- 0 sin cos |cos 0 -sin |
- RY = | 0 1 0 |
- sin 0 cos |cos -sin 0 |
- RZ = | sin cos 0 |
- 0 0 1 |
Parameters
- theta_rad: float or np.ndarray or None [rad]
rotation angle
- st, ct: float or np.ndarray or None [rad]
sin(theta) and cos(theta)
- axis: str
string to specify the axis. either ‘x’, ‘y’, or ‘z’
Returns
- rot_matrixnp.ndarray
rotation matrix