Galactic

Galactic Cartesian coordinates from RA and DEC (Alpha Centauri used for the example, and compared to a run with Celestial coordinates)

#!/usr/bin/env python3
import sys
from astropy import units as u
from astropy.coordinates import SkyCoord
c = SkyCoord(
    " ".join(sys.argv[1:7]),
    unit=(u.hourangle, u.deg),
    distance=float(sys.argv[7]))
g = c.galactic
print(g.cartesian)

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment