Commit 5c099e46 authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Update to astropy-3.1

parent c8197a64
......@@ -8,6 +8,10 @@ Changelog
- Fix a bug that prevented the output of ligo-skymap-flatten from being
gzip-compressed if the output filename ended in .gz.
- Require astropy >= 3.1 because some code that we previously had to
monkeypatch went upstream. See
https://github.com/astropy/astropy-healpix/pull/106.
0.0.18 (2018-11-19)
===================
......
......@@ -98,7 +98,8 @@ class DetectorFrame(ITRS):
@frame_transform_graph.transform(DynamicMatrixTransform, ITRS, DetectorFrame)
def itrs_to_detectorframe(from_coo, to_frame):
e_z = CartesianRepresentation(to_frame.site_1 - to_frame.site_2)
e_z = CartesianRepresentation(u.Quantity(to_frame.site_1.geocentric) -
u.Quantity(to_frame.site_2.geocentric))
e_z /= e_z.norm()
e_x = CartesianRepresentation(0, 0, 1).cross(e_z)
e_x /= e_x.norm()
......
......@@ -14,7 +14,9 @@ def test_detector_frame():
detector_frame = DetectorFrame(site_1=site_1, site_2=site_2, obstime=t)
itrs_frame = ITRS(obstime=t)
itrs_coord = SkyCoord(*(site_1 - site_2).value, frame=itrs_frame)
itrs_coord = SkyCoord(*(u.Quantity(site_1.geocentric) -
u.Quantity(site_2.geocentric)).value,
frame=itrs_frame)
assert itrs_coord.transform_to(detector_frame).lat.deg == 90
detector_coord = SkyCoord(lon=0*u.deg, lat=90*u.deg, frame=detector_frame)
......
......@@ -81,7 +81,7 @@ The following example demonstrates most of the features of this module.
markersize=30,
markeredgewidth=3)
""" # noqa: E501
from astropy.coordinates import ITRS, SkyCoord
from astropy.coordinates import SkyCoord
from astropy.io.fits import Header
from astropy.time import Time
from astropy.visualization.wcsaxes import WCSAxes
......@@ -89,8 +89,6 @@ from astropy.visualization.wcsaxes.formatter_locator import (
AngleFormatterLocator)
from astropy.visualization.wcsaxes.frame import EllipticalFrame
from astropy.wcs import WCS
from astropy.wcs.wcs import WCSSUB_CELESTIAL
from astropy.wcs.utils import custom_frame_mappings
from astropy import units as u
from matplotlib import rcParams
from matplotlib.offsetbox import AnchoredOffsetbox
......@@ -117,29 +115,6 @@ __all__ = (
'ZoomSkyAxes')
# FIXME: Remove this once astropy v3.1 is released.
# See https://github.com/astropy/astropy/pull/6990
def wcs_to_celestial_frame_itrs(wcs):
# Keep only the celestial part of the axes
wcs = wcs.sub([WCSSUB_CELESTIAL])
if wcs.wcs.lng == -1 or wcs.wcs.lat == -1:
return None
xcoord = wcs.wcs.ctype[0][:4]
ycoord = wcs.wcs.ctype[1][:4]
if xcoord == 'TLON' and ycoord == 'TLAT':
frame = ITRS(obstime=wcs.wcs.dateobs or None)
else:
frame = None
return frame
custom_frame_mappings([wcs_to_celestial_frame_itrs])
class WCSInsetPatch(PathPatch):
"""Subclass of `matplotlib.patches.PathPatch` for marking the outline of
one `astropy.visualization.wcsaxes.WCSAxes` inside another."""
......
astroplan
astropy-healpix>=0.3 # https://github.com/astropy/astropy-healpix/pull/106
astropy>=3.0
astropy>=3.1
healpy
h5py
lalsuite>=6.49, <= 6.49.1.dev20181201 # FIXME: https://git.ligo.org/lscsoft/lalsuite/issues/121
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment