Latitude#
- class astropy.coordinates.Latitude(angle, unit=None, **kwargs)[source]#
Bases:
AngleLatitude-like angle(s) which must be in the range -90 to +90 deg.
A Latitude object is distinguished from a pure
Angleby virtue of being constrained so that:-90.0 * u.deg <= angle(s) <= +90.0 * u.deg
Any attempt to set a value outside that range will result in a
ValueError.The input angle(s) can be specified either as an array, list, scalar, tuple (see below), string,
Quantityor anotherAngle.The input parser is flexible and supports all of the input formats supported by
Angle.- Parameters:
- angle
array,list, scalar,Quantity,Angle The angle value(s). If a tuple, will be interpreted as
(h, m, s)or(d, m, s)depending onunit. If a string, it will be interpreted following the rules described forAngle.If
angleis a sequence or array of strings, the resulting values will be in the givenunit, or ifNoneis provided, the unit will be taken from the first given value.- unitastropy:unit-like, optional
The unit of the value specified for the angle. This may be any string that
Unitunderstands, but it is better to give an actual unit object. Must be an angular unit.
- angle
- Raises:
UnitsErrorIf a unit is not provided or it is not an angular unit.
TypeErrorIf the angle parameter is an instance of
Longitude.