In [1]:
import astropy.coordinates as coord
import astropy.units as u
import matplotlib.pyplot as pl
%matplotlib inline
import numpy as np
from ophiuchus.coordinates import Ophiuchus
In [2]:
l = np.random.uniform(0., 15., size=32)
b = np.random.uniform(20., 40., size=32)
g = coord.Galactic(l=l*u.degree, b=b*u.degree)
oph = g.transform_to(Ophiuchus)
In [3]:
fig,axes = pl.subplots(1,2,figsize=(10,4))
axes[0].plot(l, b, ls='none', marker='o')
axes[1].plot(oph.phi1.wrap_at(180*u.degree).degree, oph.phi2.degree,
ls='none', marker='o')
Out[3]: