Skip to content

Commit

Permalink
Change the default units for HPC.distance
Browse files Browse the repository at this point in the history
This is a change needed for #2465 and is one of the changes that was
merged into master in #2431
  • Loading branch information
Cadair committed Feb 17, 2018
1 parent 05069be commit 66b718f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Bug Fixes
---------

- Improve detection of ``SkyCoord`` frame instantiation when distance is
`1*u.one`. This fixes a plotting bug with ``WCSAxes`` in Astropy 3.0
`1*u.one`. This fixes a plotting bug with ``WCSAxes`` in Astropy 3.0 [#2465]
- removed `wavelnth` keyword in meta desc of Maps to avoid using non standard FITS keyword like `nan` [#2427]
- Change the default units for HPC distance from `u.km` to `None`. [#2465]

0.8.3
=====
Expand Down
4 changes: 2 additions & 2 deletions sunpy/coordinates/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ class Helioprojective(BaseCoordinateFrame):
'spherical': [
RepresentationMapping('lon', 'Tx', u.arcsec),
RepresentationMapping('lat', 'Ty', u.arcsec),
RepresentationMapping('distance', 'distance', u.km)
RepresentationMapping('distance', 'distance', None)
],
'sphericalwrap180': [
RepresentationMapping('lon', 'Tx', u.arcsec),
RepresentationMapping('lat', 'Ty', u.arcsec),
RepresentationMapping('distance', 'distance', u.km)
RepresentationMapping('distance', 'distance', None)
],
'unitspherical': [
RepresentationMapping('lon', 'Tx', u.arcsec),
Expand Down
2 changes: 1 addition & 1 deletion sunpy/coordinates/tests/test_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_create_3d(args, kwargs):
# Check the attrs are in the correct default units
assert hpc1.Tx.unit is u.arcsec
assert hpc1.Ty.unit is u.arcsec
assert hpc1.distance.unit is u.km
assert hpc1.distance.unit.is_equivalent(u.km)


def test_cart_init():
Expand Down

0 comments on commit 66b718f

Please sign in to comment.