astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Astronomical Coordinate Systems (`astropy.coordinates`) »
- Longitude

# Longitude

class `astropy.coordinates.angles.``Longitude`

  Bases: `astropy.coordinates.angles.Angle`

  Longitude-like angle(s) which are wrapped within a contiguous 360 degree range.

  A `Longitude` object is distinguished from a pure `Angle` by virtue of a `wrap_angle` property. The `wrap_angle` specifies that all angle values represented by the object will be in the range:

      wrap_angle - 360 * u.deg <= angle(s) < wrap_angle

  The default `wrap_angle` is 360 deg. Setting `wrap_angle=180 * u.deg` would instead result in values between -180 and +180 deg. Setting the `wrap_angle` attribute of an existing `Longitude` object will result in re-wrapping the angle values in-place.

  The input angle(s) can be specified either as an array, list, scalar, tuple, string, `Quantity` or another `Angle`.

  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 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 : `UnitBase`, str, 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.

  wrap_angle : `Angle` or equivalent

  > Angle at which to wrap back to `wrap_angle - 360 deg`.

  Raises:

  `~astropy.units.core.UnitsError` :

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

  Attributes Summary

  `wrap_angle` |

  Attributes Documentation

  `wrap_angle`