Skip to content

Commit 8d19b6b

Browse files
committed
WIP: Temporarily remove height validation
See astropygh-11104.
1 parent 5319f16 commit 8d19b6b

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

‎astropy/coordinates/earth.py‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -882,17 +882,6 @@ def __init__(self, lon, lat=None, height=None, copy=True):
882882
height = Distance(0, 'm')
883883
super().__init__(lon, lat, height, copy=copy)
884884

885-
try:
886-
self._height = Distance(self._height, copy=False)
887-
except ValueError as e:
888-
if e.args[0].startswith('Height must be >= 0'):
889-
raise ValueError("Height must be >= 0. To allow negative "
890-
"height values, you must explicitly pass"
891-
" in a `Distance` object with the the "
892-
"argument 'allow_negative=True'.")
893-
else:
894-
raise
895-
896885
def to_cartesian(self):
897886
"""
898887
Converts WGS84 geodetic coordinates to 3D rectangular (geocentric)

‎astropy/coordinates/representation.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,6 +1810,8 @@ def __init__(self, lon, lat=None, distance=None, differentials=None,
18101810
try:
18111811
self._distance = Distance(self._distance, copy=False)
18121812
except ValueError as e:
1813+
# FIXME: This will raise no matter what,
1814+
# see https://github.com/astropy/astropy/issues/11104
18131815
if e.args[0].startswith('Distance must be >= 0'):
18141816
raise ValueError("Distance must be >= 0. To allow negative "
18151817
"distance values, you must explicitly pass"

0 commit comments

Comments
 (0)