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

Support sub-classes of spherical representation classes #177

Merged
merged 2 commits into from
Aug 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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