Dec

class astropy.coordinates.angles.Dec(angle, unit=None) [edit on github][source]

Bases: astropy.coordinates.angles.Angle

Represents a declination value.

This object can be created from a numeric value along with a unit, or else a string in any commonly represented format, e.g. “12 43 23.53”, “-32d52m29s”. Unless otherwise specified via the ‘unit’ parameter, degrees are assumed. Bounds are fixed to [-90,90] degrees.

Parameters :

angle : float, int, str, tuple

The angle value. If a tuple, will be interpreted as (h, m s) or (d, m, s) depending on unit. If a string, it will be interpreted following the rules described above.

unit : UnitBase, str

The unit of the value specified for the angle. This may be any string that Unit understands, but it is better to give an actual unit object. Must be one of degree, radian, or hour.

bounds : tuple

A tuple indicating the upper and lower value that the new angle object may have.

Raises :

`~astropy.coordinates.errors.UnitsError` :

If a unit is not provided or it is not hour, radian, or degree.

Page Contents