healpy.rotator.rotateDirection¶
- healpy.rotator.rotateDirection(rotmat, theta, phi=None, do_rot=True, lonlat=False)¶
Rotate the vector described by angles theta,phi using the rotation matrix given as first argument.
- Parameters:
- rotmatfloat, array-like shape (3,3)
The rotation matrix
- thetafloat, scalar or array-like
The angle theta (scalar or shape (N,)) or both angles (scalar or shape (2, N)) if phi is not given.
- phifloat, scalar or array-like, optionnal
The angle phi (scalar or shape (N,)).
- do_rotbool, optional
if True, really perform the operation, if False do nothing.
- lonlatbool
If True, input angles are assumed to be longitude and latitude in degree, otherwise, they are co-latitude and longitude in radians.
- Returns:
- anglesfloat, array
The angles of describing the rotated vector(s).
See also