Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gwcs broken with Astropy 2.0 #94

Closed
olebole opened this issue Jul 29, 2017 · 5 comments
Closed

gwcs broken with Astropy 2.0 #94

olebole opened this issue Jul 29, 2017 · 5 comments

Comments

@olebole
Copy link
Contributor

olebole commented Jul 29, 2017

Currently, gwcs does not work well with Astropy 2.0; one of the unit test fails:

=================================== FAILURES ===================================
____________________________ test_from_fiducial_sky ____________________________

    def test_from_fiducial_sky():
        sky = coord.SkyCoord(1.63 * u.radian, -72.4 * u.deg, frame='fk5')
        tan = models.Pix2Sky_TAN()
>       w = wcs_from_fiducial(sky, projection=tan)

/usr/lib/python3/dist-packages/gwcs/tests/test_wcs.py:153:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/gwcs/wcstools.py:62: in wcs_from_fiducial
    fiducial_transform = _sky_transform(fiducial, projection)
/usr/lib/python3/dist-packages/gwcs/wcstools.py:112: in _sky_transform
    sky_rotation = models.RotateNative2Celestial(lon, lat, lon_pole)
/usr/lib/python3/dist-packages/astropy/modeling/rotations.py:231: in __init__
    super(RotateNative2Celestial, self).__init__(lon, lat, lon_pole, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _

self = <[AttributeError("lon") raised in repr()] RotateNative2Celestialobject at 0x7f4499dd52e8>
lon = <Longitude 93.39212060632418 deg>, lat = <Latitude -72.4 deg>
lon_pole = 180, kwargs = {}, qs = [True, True, False]

    def __init__(self, lon, lat, lon_pole, **kwargs):
        qs = [isinstance(par, u.Quantity) for par in [lon, lat, lon_pole]]
        if any(qs) and not all(qs):
>           raise TypeError("All parameters should be of the same type - float or Quantity.")
E           TypeError: All parameters should be of the same type - float

Full test log here. There is also a Debian bug #868115.

It seems that gwcs.util does not use units in _compute_lon_pole(); I am however unsure about side effects when just adding u.deg there.

@olebole
Copy link
Contributor Author

olebole commented Jul 29, 2017

Oops, I just found that this is already solved in git. However, maybe a new, astropy compatible version would be helpful?

@nden
Copy link
Collaborator

nden commented Jul 29, 2017

I was planning to have a new release in Oct but I should probably upload one with the current state of the code now.

@nden
Copy link
Collaborator

nden commented Nov 20, 2017

0.8.0 was released on pypi.

@nden nden closed this as completed Nov 20, 2017
@olebole
Copy link
Contributor Author

olebole commented Nov 20, 2017

Thanks!

@stscijgbot
Copy link

This ticket is now being tracked at AL-60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants