I'm not really sure if that is exactly what you want but I give it a try:
You probably need to use the SkyCoord
class:
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord
ra = np.random.uniform(130., 135., 10)
dec = np.random.uniform(-55., -57., 10)
You must use astropy units to set it up:
a = SkyCoord(ra * u.degree, dec * u.degree)
a
<SkyCoord (ICRS): (ra, dec) in deg
[(134.26176984, -55.707478), (134.58510684, -55.87649941),
(134.87524059, -56.48554659), (133.13341559, -56.81440026),
(132.87143675, -56.44936089), (131.14191795, -56.68300147),
(133.50910855, -56.07594072), (132.05561955, -56.90231565),
(134.62961065, -55.72207914), (133.64757046, -55.59277667)]>
Now you have a coordinate class (not sure what coordinate system is most appropriate. SkyCoord
defaults to ICRS
). If you want to calculate it's azimutal projection you can use other representations I think PhysicsSphericalRepresentation is what you want?!
a.represent_as('physicsspherical')
<PhysicsSphericalRepresentation (phi, theta, r) in (deg, deg, )
[(134.26176984, 145.707478, 1.0), (134.58510684, 145.87649941, 1.0),
(134.87524059, 146.48554659, 1.0), (133.13341559, 146.81440026, 1.0),
(132.87143675, 146.44936089, 1.0), (131.14191795, 146.68300147, 1.0),
(133.50910855, 146.07594072, 1.0), (132.05561955, 146.90231565, 1.0),
(134.62961065, 145.72207914, 1.0), (133.64757046, 145.59277667, 1.0)]>