Skip to content

Commit

Permalink
explicitly build a UnitSphericalRepresentation when making a SkyCoord
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair authored and eteq committed Feb 7, 2018
1 parent 4c5d6c9 commit e380068
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion astropy/visualization/wcsaxes/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,10 @@ def transform(self, input_coords):
if self.same_frames:
return input_coords

input_coords = input_coords*u.deg
x_in, y_in = input_coords[:, 0], input_coords[:, 1]

c_in = SkyCoord(x_in, y_in, unit=(u.deg, u.deg),
c_in = SkyCoord(UnitSphericalRepresentation(x_in, y_in),
frame=self.input_system)

# We often need to transform arrays that contain NaN values, and filtering
Expand Down

0 comments on commit e380068

Please sign in to comment.