def euler_to_rotation_matrix((rot, tilt, psi)):
x, y, z = np.radians(rot, tilt, psi)
Rx = np.array([[1, 0, 0],
[0, np.cos(x), -np.sin(x)],
[0, np.sin(x), np.cos(x)]])
Ry = np.array([[np.cos(y), 0, np.sin(y)],
[0, 1, 0],
[-np.sin(y), 0, np.cos(y)]])
Rz = np.array([[np.cos(z), -np.sin(z), 0],
[np.sin(z), np.cos(z), 0],
[0, 0, 1]])
rotation_matrix = Rz @ Ry @ Rx
return rotation_matrix
Is this right? Please, thanks