angular_separation#

astropy.coordinates.angular_separation(lon1, lat1, lon2, lat2)[source]#

Angular separation between two points on a sphere.

Parameters:
lon1, lat1, lon2, lat2Angle, Quantity or float

Longitude and latitude of the two points. Quantities should be in angular units; floats in radians.

Returns:
angular separationQuantity [:ref: ‘angle’] or float

Type depends on input; Quantity in angular units, or float in radians.

Notes

The angular separation is calculated using the Vincenty formula [1], which is slightly more complex and computationally expensive than some alternatives, but is stable at at all distances, including the poles and antipodes.