cogwheel.skyloc_angles.get_rotation_matrix

cogwheel.skyloc_angles.get_rotation_matrix(x_3d, y_3d)

Return a rotation matrix R such that R @ r = r', where r' are the coordinates in the new frame (@ is matrix multiplication).

The new frame’s axis are the unit vectors x_3d, y_3d, z_3d (each a normalized size 3 numpy array).

Equivalently:

R @ x_3d = (1, 0, 0)
R @ y_3d = (0, 1, 0)
R @ z_3d = (0, 0, 1).