Get angular distance from RA and DEC

PyAstronomy.pyasl.getAngDist(ra1, dec1, ra2, dec2)

Calculate the angular distance between two coordinates.

Parameters
ra1float, array

Right ascension of the first object in degrees.

dec1float, array

Declination of the first object in degrees.

ra2float, array

Right ascension of the second object in degrees.

dec2float, array

Declination of the second object in degrees.

Returns
Anglefloat, array

The angular distance in DEGREES between the first and second coordinate in the sky.

Example

from __future__ import print_function, division
from PyAstronomy import pyasl

print("Angular distance between the poles (deg):")
print(pyasl.getAngDist(98.0, -90.0, 100., +90.0))

print("Angular distance between Vega and Altair (deg)")
print(pyasl.getAngDist(279.23473479, +38.78368896,297.69582730, +08.86832120))