You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent angle string unit in coordinates/angles gives incorrect errors / values #1387
>>> ICRSCoordinates('3d4m5s +6h7m8s', unit=(u.hour, u.degree))
BoundsError: The angle(s) [ 5156.62015618 6016.05684887 6875.49354157] falls outside of the specified bounds (-5156.62015618, 5156.62015618) (in deg)
>>> ICRSCoordinates('0d0m0s +0h0m0s', unit=(u.hour, u.degree))
ValueError: Unknown format code 'f' for object of type 'str'
This may be related to this problem in Angle where giving an HMS string with unit=u.degree results in a length=3 array:
In [4]: ICRSCoordinates('3d4m5s +6h7m8s', unit=(u.hour, u.degree))
ERROR: BoundsError: The angle(s) 5258.79762964 falls outside of the specified bounds (-5156.62015618, 5156.62015618) (in deg) [astropy.coordinates.angles]
In [4]: ICRSCoordinates('3d4m5s +6h7m8s', unit=(u.hour, u.degree))
ERROR: BoundsError: The angle(s) 5258.79762964 falls outside of the specified bounds (-5156.62015618, 5156.62015618) (in deg) [astropy.coordinates.angles]
Agreed that 6h7m is outside of 90 degrees, but what the heck is with the angle of 5258.79 and bounds of +/-5156.62? I think that #1388 is good for merge, but that this issue #1387 should stay open until we resolve the above.
The bug in the error message is actually gone in master, since #1310 was merged (and the error message happens in a completely different way). Rebasing #1387 fixed it.
Activity
Remove non-crucial example that fails now in master (see astropy#1387)
mdboom commentedon Aug 30, 2013
That last example is definitely wrong, and I thought it was covered by the tests. Let me look into that.
mdboom commentedon Sep 3, 2013
With #1388:
I think that's a legit error.
And
taldcroft commentedon Sep 3, 2013
Agreed that 6h7m is outside of 90 degrees, but what the heck is with the angle of 5258.79 and bounds of +/-5156.62? I think that #1388 is good for merge, but that this issue #1387 should stay open until we resolve the above.
mdboom commentedon Sep 3, 2013
Oh, gee. Of course. Something is wrong with the unit of the error message, I suspect.
Partial fix for astropy#1387: Angles are not properly parsed when the…
mdboom commentedon Sep 3, 2013
The bug in the error message is actually gone in master, since #1310 was merged (and the error message happens in a completely different way). Rebasing #1387 fixed it.
taldcroft commentedon Sep 3, 2013
@mdboom - Excellent. So it looks like you are good to merge #1388 and close #1387, at least from my perspective.