Skip to content

Instantly share code, notes, and snippets.

@adrn
Last active December 17, 2015 01:19
Show Gist options
  • Save adrn/5527142 to your computer and use it in GitHub Desktop.
Save adrn/5527142 to your computer and use it in GitHub Desktop.
Transform to and from Sagittarius coordinates in Python
import astropy.units as u
from astropy.coordinates import ICRSCoordinates
from streams.coordinates import SgrCoordinates, OrphanCoordinates
icrs = ICRSCoordinates(15.34167, 1.53412, unit=(u.hour, u.degree))
sgr = icrs.transform_to(SgrCoordinates)
print(sgr.Lambda, sgr.Beta)
orp = sgr.transform_to(OrphanCoordinates)
print(orp.Lambda, orp.Beta)
@andycasey
Copy link

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment