paramagpy.metal.euler_to_matrix¶
- paramagpy.metal.euler_to_matrix(eulers)[source]¶
Calculate a rotation matrix from euler angles using ZYZ convention
- Parameters
eulers (array of floats) – the euler angles [alpha,beta,gamma] in radians by ZYZ convention.
- Returns
matrix – the rotation matrix
- Return type
3x3 numpy ndarray
Examples
>>> eulers = np.array([0.5,1.2,0.8]) >>> euler_to_matrix(eulers) array([[-0.1223669 , -0.5621374 , 0.81794125], [ 0.75057357, 0.486796 , 0.44684334], [-0.64935788, 0.66860392, 0.36235775]])