Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Commit

Permalink
Merge pull request #177 from astrofrog/fix-spherical
Browse files Browse the repository at this point in the history
Support sub-classes of spherical representation classes
  • Loading branch information
astrofrog committed Aug 20, 2015
2 parents db75504 + 18ed5a8 commit 1c6f2cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- Use wcs_to_celestial from Astropy. Astropy >= 1.0 is now required for
WCSAxes. [#176]

- Fix bug that caused coordinate transformations to not work properly if they
used sub-classes of Spherical representation classes. [#177]

0.6 (2015-07-20)
----------------

Expand Down
3 changes: 1 addition & 2 deletions wcsaxes/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ def transform(self, input_coords):

c_out = c_in.transform_to(self.output_system)

if (c_out.representation is SphericalRepresentation or
c_out.representation is UnitSphericalRepresentation):
if issubclass(c_out.representation, (SphericalRepresentation, UnitSphericalRepresentation)):
lon = c_out.data.lon.deg
lat = c_out.data.lat.deg
else:
Expand Down

0 comments on commit 1c6f2cc

Please sign in to comment.