astrofrog / wcsaxes

wcsaxes has been merged into astropy!
http://docs.astropy.org/en/stable/visualization/wcsaxes/index.html
22 stars 21 forks source link

Implement a function to do offset coordinates #166

Closed astrofrog closed 6 years ago

astrofrog commented 9 years ago

Turned out to be very easy with a lot of existing astropy.wcs functions:

from astropy import units as u
from astropy.coordinates import SkyCoord

c = SkyCoord(0. * u.deg, 0. * u.deg, frame='galactic')

new_wcs = make_offset_wcs(wcs, c)

import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_axes([0.15, 0.1, 0.8, 0.8], projection=new_wcs)
etc.
astrofrog commented 9 years ago

Need tests and docs...

astrofrog commented 8 years ago

I'm going to try and suggest this for astropy.wcs.utils instead since it's pretty generic.

astrofrog commented 6 years ago

We probably don't need this given SkyOffset frames in Astropy