astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- Astronomical Coordinate Systems (`astropy.coordinates`) »
- UnitSphericalRepresentation

# UnitSphericalRepresentation

class `astropy.coordinates.``UnitSphericalRepresentation`(lon, lat, copy=True)

  Bases: `astropy.coordinates.BaseRepresentation`

  Representation of points on a unit sphere.

  Parameters:

  lon, lat : `Quantity` or str

  > The longitude and latitude of the point(s), in angular units. The latitude should be between -90 and 90 degrees, and the longitude will be wrapped to an angle between 0 and 360 degrees. These can also be instances of `Angle`, `Longitude`, or `Latitude`.

  copy : bool, optional

  > If True arrays will be copied rather than referenced.

  Attributes Summary

  `attr_classes` |
  `lat` | The latitude of the point(s).
  `lon` | The longitude of the point(s).
  `recommended_units` |

  Methods Summary

  `from_cartesian`(cart) | Converts 3D rectangular cartesian coordinates to spherical polar coordinates.
  `represent_as`(other_class) |
  `to_cartesian`() | Converts spherical polar coordinates to 3D rectangular cartesian coordinates.

  Attributes Documentation

  `attr_classes` = OrderedDict([(u'lon', <class 'astropy.coordinates.angles.Longitude'>), (u'lat', <class 'astropy.coordinates.angles.Latitude'>)])
  `lat`

    The latitude of the point(s).

  `lon`

    The longitude of the point(s).

  `recommended_units` = {u'lat': Unit("deg"), u'lon': Unit("deg")}

  Methods Documentation

  classmethod `from_cartesian`(cart)

    Converts 3D rectangular cartesian coordinates to spherical polar coordinates.

  `represent_as`(other_class)
  `to_cartesian`()

    Converts spherical polar coordinates to 3D rectangular cartesian coordinates.