healpy.pixelfunc.vec2ang¶
-
healpy.pixelfunc.
vec2ang
(vectors, lonlat=False)¶ vec2ang: vectors [x, y, z] -> theta[rad], phi[rad]
Parameters: - vectors : float, array-like
the vector(s) to convert, shape is (3,) or (N, 3)
- lonlat : bool, optional
If True, return angles will be longitude and latitude in degree, otherwise, angles will be longitude and co-latitude in radians (default)
Returns: - theta, phi : float, tuple of two arrays
the colatitude and longitude in radians
See also
ang2vec
,rotator.vec2dir
,rotator.dir2vec