[Debian-astro-maintainers] Bug#868116: astroplan broken with astropy 2.0

Ole Streicher olebole at debian.org
Wed Jul 12 07:23:22 UTC 2017


Package: astroplan
Version: 0.2.1-1
Severity: serious
Control: block 868113 by -1

Hi,

with the latest version of astropy (2.0), astroplan does not work
anymore. From the CI log
<https://ci.debian.net/data/autopkgtest/unstable/amd64/a/astroplan/20170711_003537/log.gz>

___________________________ test_observability_table
___________________________

    def test_observability_table():
        subaru = Observer.at_site("Subaru")
        time_ranges = [Time(['2001-02-03 04:05:06', '2001-02-04
04:05:06']),  # 1 day
                       Time(['2007-08-09 10:11:12', '2007-08-09
11:11:12'])]  # 1 hr
        targets = [vega, rigel, polaris]

        time_range = Time(['2001-02-03 04:05:06', '2001-02-04 04:05:06'])
        # note that this uses the AirmassConstraint in None min mode -
that means
        # targets below the horizon will pass the airmass constraint
        constraints = [AtNightConstraint(), AirmassConstraint(3, None)]

        obstab = observability_table(constraints, subaru, targets,
>                                    time_range=time_range)

[...]

/usr/lib/python3/dist-packages/astroplan/observer.py:390: in
_preprocess_inputs
    target = get_skycoord(target)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

targets = [<FixedTarget "Vega" at SkyCoord (ICRS): (ra, dec) in deg (
279.23473479,  38.78368896)>, <FixedTarget "Rigel" at SkyC...
78.63446707,  8.20163837)>, <FixedTarget "Polaris" at SkyCoord (ICRS):
(ra, dec) in deg ( 37.95456067,  89.26410897)>]

    def get_skycoord(targets):
        """[...]"""
        if convert_to_icrs:
            # mixture of frames
            for coordinate in coords:
                icrs_coordinate = coordinate.icrs
                longitudes.append(icrs_coordinate.ra)
                latitudes.append(icrs_coordinate.dec)
                if get_distances:
                    distances.append(icrs_coordinate.distance)
            frame = ICRS()
        else:
            # all the same frame, get the longitude and latitude names
            lon_name, lat_name = [mapping.framename for mapping in
>
coords[0].frame_specific_representation_info['spherical']]
E           KeyError: 'spherical'

/usr/lib/python3/dist-packages/astroplan/target.py:238: KeyError

[...]
____________________________ test_parallactic_angle
____________________________

    def test_parallactic_angle():
[...]
        obs = Observer(location=location)
>       q1 = obs.parallactic_angle(time, target1)

/usr/lib/python3/dist-packages/astroplan/tests/test_observer.py:244:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/astroplan/observer.py:507: in
parallactic_angle
    LST = time.sidereal_time('mean', longitude=self.location.longitude)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _

args = (<EarthLocation (-5464284.49954002, -2493443.69726326,
2151019.75996169) m>,)
kwargs = {}
category = <class 'astropy.utils.exceptions.AstropyDeprecationWarning'>

    def deprecated_func(*args, **kwargs):
        if pending:
            category = AstropyPendingDeprecationWarning
        else:
            category = AstropyDeprecationWarning

>       warnings.warn(message, category, stacklevel=2)
E       astropy.utils.exceptions.AstropyDeprecationWarning: The
longitude property is deprecated and may be removed in a future version.
E               Use `lon` instead.

/usr/lib/python3/dist-packages/astropy/utils/decorators.py:119:
AstropyDeprecationWarning

Could you have a look please?

Best regards

Ole



More information about the Debian-astro-maintainers mailing list