vector_to_radec¶
- spherical_geometry.vector.vector_to_radec(x, y, z, degrees=True)¶
Converts a vector to longitude and latitude.
- Parameters:
- x, y, zscalars or 1-D arrays
The input vectors
- degreesbool, optional
If
True(default) the result is returned in decimal degrees, otherwise radians.
- Returns:
- lon, lattuple of scalars or arrays of the same length
Notes
Where longitude is l and latitude is b:
\[ \begin{align}\begin{aligned}l = \arctan2(y, x)\\b = \arctan2(z, \sqrt{x^2 + y^2})\end{aligned}\end{align} \]