astropy/astropy — pull request #947 by lpsinger (2013-04-04 20:20:05+00:00)
Title: Add relax= keyword argument to angle constructors

If set to `True`, then out-of-bounds angles (such as seconds >= 60,
as in `00:20:60.0`) result in warnings instead of exceptions. Many data
sets, including the Fermi GBM GRB catalog, give sexagesimal angles that
are improperly rounded.

The default is `relax=False`; if `relax=` is not specified, then
out-of-bounds angles continue to produce exceptions.

Example with default behavior:

>>> ICRSCoordinates('00:60 00:60', unit=('deg', 'deg'))
ERROR: IllegalMinuteError [astropy.coordinates.angle_utilities]
Traceback (most recent call last):
etc.

Example with 'relaxed' behavior:

>>> ICRSCoordinates('00:60 00:60', unit=('deg', 'deg'), relax=True)
WARNING: [astropy.coordinates.angle_utilities]