astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Astronomical Coordinate Systems (`astropy.coordinates`) »
- Latitude

# Latitude

class astropy.coordinates.Latitude(angle, unit=None, **kwargs)

  Bases: `Angle`

  Latitude-like angle(s) which must be in the range -90 to +90 deg.

  A Latitude object is distinguished from a pure `Angle` by 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, `Quantity` or another `Angle`.

  The input parser is flexible and supports all of the input formats supported by `Angle`.

  Parameters:
    angle `array`, `python:list`, scalar, `Quantity`, `Angle`

      The angle value(s). 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 for `Angle`.

      If `angle` is a sequence or array of strings, the resulting values will be in the given `unit`, or if `None` is provided, the unit will be taken from the first given value.

    unit astropy:unit-like, optional

      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 an angular unit.

  Raises:
    `UnitsError`

      If a unit is not provided or it is not an angular unit.

    `TypeError`

      If the angle parameter is an instance of `Longitude`.