(rot, deg=False, eulertype="ZYX")
return matrot, do_rot, rot
Return the rotation matrix corresponding to angles given in rot.

    Usage: matrot,do_rot,normrot = get_rotation_matrix(rot)

    Input:
       - rot: either None, an angle or a tuple of 1,2 or 3 angles
              corresponding to Euler angles.
    Output:
       - matrot: 3x3 rotation matrix
       - do_rot: True if rotation is not identity, False otherwise
       - normrot: the normalized version of the input rot.
Return the rotation matrix corresponding to angles given in rot.
Return the rotation matrix corresponding to angles given in rot .
def get_rotation_matrix(rot, deg=False, eulertype="ZYX"):
    """Return the rotation matrix corresponding to angles given in rot.

    Usage: matrot,do_rot,normrot = get_rotation_matrix(rot)

    Input:
       - rot: either None, an angle or a tuple of 1,2 or 3 angles
              corresponding to Euler angles.
    Output:
       - matrot: 3x3 rotation matrix
       - do_rot: True if rotation is not identity, False otherwise
       - normrot: the normalized version of the input rot.
    """
    rot = normalise_rot(rot, deg=deg)
    if not np.allclose(rot, np.zeros(3), rtol=0.0, atol=1.0e-15):
        do_rot = True
    else:
        do_rot = False
    if eulertype == "X":
        matrot = euler_matrix_new(rot[0], -rot[1], rot[2], X=True)
    elif eulertype == "Y":
        matrot = euler_matrix_new(rot[0], -rot[1], rot[2], Y=True)
    else:
        matrot = euler_matrix_new(rot[0], -rot[1], rot[2], ZYX=True)

    return matrot, do_rot, rot
def get_rotation_matrix ( rot , deg = False , eulertype = "ZYX" ) : rot = normalise_rot ( rot , deg = deg ) if not np . allclose ( rot , np . zeros ( 3 ) , rtol = 0.0 , atol = 1.0e-15 ) : do_rot = True else : do_rot = False if eulertype == "X" : matrot = euler_matrix_new ( rot [ 0 ] , - rot [ 1 ] , rot [ 2 ] , X = True ) elif eulertype == "Y" : matrot = euler_matrix_new ( rot [ 0 ] , - rot [ 1 ] , rot [ 2 ] , Y = True ) else : matrot = euler_matrix_new ( rot [ 0 ] , - rot [ 1 ] , rot [ 2 ] , ZYX = True ) return matrot , do_rot , rot