synthpop.synthpop_utils.utils_functions ======================================= .. py:module:: synthpop.synthpop_utils.utils_functions .. autoapi-nested-parse:: This file contains several utils function Functions --------- .. autoapisummary:: synthpop.synthpop_utils.utils_functions.solidangle_to_half_cone_angle synthpop.synthpop_utils.utils_functions.half_cone_angle_to_solidangle synthpop.synthpop_utils.utils_functions.rotation_matrix Module Contents --------------- .. py:function:: solidangle_to_half_cone_angle(solid_angle) .. py:function:: half_cone_angle_to_solidangle(cone_angle) .. py:function:: 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_matrix : np.ndarray rotation matrix