Skip to main content
`Ctrl`+`K`

# Reference/API

## astropy.coordinates Package

This subpackage contains classes and functions for celestial coordinates of astronomical objects. It also contains a framework for conversions between coordinate systems.

### Functions

`angular_separation`(lon1, lat1, lon2, lat2) | Angular separation between two points on a sphere.
`cartesian_to_spherical`(x, y, z) | Converts 3D rectangular cartesian coordinates to spherical polar coordinates.
`concatenate`(coords) | Combine multiple coordinate objects into a single `SkyCoord`.
`concatenate_representations`(reps) | Combine multiple representation objects into a single instance by concatenating the data in each component.
`custom_stokes_symbol_mapping`(mapping[, replace]) | Add a custom set of mappings from values to Stokes symbols.
`get_body`(body, time[, location, ephemeris]) | Get a `SkyCoord` for a solar system body as observed from a location on Earth in the `GCRS` reference system.
`get_body_barycentric`(body, time[, ephemeris]) | Calculate the barycentric position of a solar system body.
`get_body_barycentric_posvel`(body, time[, ...]) | Calculate the barycentric position and velocity of a solar system body.
`get_constellation`(coord[, short_name, ...]) | Determines the constellation(s) a given coordinate object contains.
`get_icrs_coordinates`(name[, parse, cache]) | Retrieve an ICRS object by using Sesame to retrieve coordinates for the specified name.
`get_sun`(time) | Determines the location of the sun at a given time (or times, if the input is an array `Time` object), in geocentric coordinates.
`golden_spiral_grid`(size) | Generate a grid of points on the surface of the unit sphere using the Fibonacci or Golden Spiral method.
`make_transform_graph_docs`(transform_graph) | Generates a string that can be used in other docstrings to include a transformation graph, showing the available transforms and coordinate systems.
`match_coordinates_3d`(matchcoord, catalogcoord) | Finds the nearest 3-dimensional matches of a coordinate or coordinates in a set of catalog coordinates.
`match_coordinates_sky`(matchcoord, catalogcoord) | Finds the nearest on-sky matches of a coordinate or coordinates in a set of catalog coordinates.
`offset_by`(lon, lat, posang, distance) | Point with the given offset from the given point.
`position_angle`(lon1, lat1, lon2, lat2) | Position Angle (East of North) between two points on a sphere.
`search_around_3d`(coords1, coords2, distlimit) | Searches for pairs of points that are at least as close as a specified distance in 3D space.
`search_around_sky`(coords1, coords2, seplimit) | Searches for pairs of points that have an angular separation at least as close as a specified angle.
`spherical_to_cartesian`(r, lat, lon) | Converts spherical polar coordinates to rectangular cartesian coordinates.
`uniform_spherical_random_surface`([size]) | Generate a random sampling of points on the surface of the unit sphere.
`uniform_spherical_random_volume`([size, ...]) | Generate a random sampling of points that follow a uniform volume density distribution within a sphere.

### Classes

`AffineTransform`(transform_func, fromsys, tosys) | A coordinate transformation specified as a function that yields a 3 x 3 cartesian transformation matrix and a tuple of displacement vectors.
`AltAz`(*args, **kwargs) | A coordinate or frame in the Altitude-Azimuth system (Horizontal coordinates) with respect to the WGS84 ellipsoid.
`Angle`(angle[, unit, dtype, copy]) | One or more angular value(s) with units equivalent to radians or degrees.
`Attribute`([default, secondary_attribute, doc]) | A non-mutable data descriptor to hold a frame attribute.
`BarycentricMeanEcliptic`(*args[, copy, ...]) | Barycentric mean ecliptic coordinates.
`BarycentricTrueEcliptic`(*args[, copy, ...]) | Barycentric true ecliptic coordinates.
`BaseAffineTransform`(fromsys, tosys[, ...]) | Base class for common functionality between the `AffineTransform`-type subclasses.
`BaseBodycentricRepresentation`(lon[, lat, ...]) | Representation of points in bodycentric 3D coordinates.
`BaseCoordinateFrame`(*args[, copy, ...]) | The base class for coordinate frames.
`BaseDifferential`(*args, **kwargs) | A base class representing differentials of representations.
`BaseEclipticFrame`(*args[, copy, ...]) | A base class for frames that have names and conventions like that of ecliptic frames.
`BaseGeodeticRepresentation`(lon[, lat, ...]) | Base class for geodetic representations.
`BaseRADecFrame`(*args[, copy, ...]) | A base class that defines default representation info for frames that represent longitude and latitude as Right Ascension and Declination following typical "equatorial" conventions.
`BaseRepresentation`(*args[, differentials]) | Base for representing a point in a 3D coordinate system.
`BaseRepresentationOrDifferential`(*args, **kwargs) | 3D coordinate representations and differentials.
`BaseSphericalCosLatDifferential`(*args, **kwargs) | Differentials from points on a spherical base representation.
`BaseSphericalDifferential`(*args, **kwargs) |
`BoundsError` | Raised when an angle is outside of its user-specified bounds.
`CIRS`(*args[, copy, representation_type, ...]) | A coordinate or frame in the Celestial Intermediate Reference System (CIRS).
`CartesianDifferential`(d_x[, d_y, d_z, unit, ...]) | Differentials in of points in 3D cartesian coordinates.
`CartesianRepresentation`(x[, y, z, unit, ...]) | Representation of points in 3D cartesian coordinates.
`CartesianRepresentationAttribute`([default, ...]) | A frame attribute that is a CartesianRepresentation with specified units.
`CompositeTransform`(transforms, fromsys, tosys) | A transformation constructed by combining together a series of single-step transformations.
`ConvertError` | Raised if a coordinate system cannot be converted to another.
`CoordinateAttribute`(frame[, default, ...]) | A frame attribute which is a coordinate object.
`CoordinateFrameInfo`([bound]) | Container for meta information like name, description, format.
`CoordinateTransform`(fromsys, tosys[, ...]) | An object that transforms a coordinate from one system to another.
`CustomBarycentricEcliptic`(*args[, copy, ...]) | Barycentric ecliptic coordinates with custom obliquity.
`CylindricalDifferential`(d_rho[, d_phi, d_z, ...]) | Differential(s) of points in cylindrical coordinates.
`CylindricalRepresentation`(rho[, phi, z, ...]) | Representation of points in 3D cylindrical coordinates.
`DifferentialAttribute`([default, ...]) | A frame attribute which is a differential instance.
`Distance`([value, unit, z, cosmology, ...]) | A one-dimensional distance.
`DynamicMatrixTransform`(matrix_func, fromsys, ...) | A coordinate transformation specified as a function that yields a 3 x 3 cartesian transformation matrix.
`EarthLocation`(*args, **kwargs) | Location on the Earth.
`EarthLocationAttribute`([default, ...]) | A frame attribute that can act as a `EarthLocation`.
`FK4`(*args[, copy, representation_type, ...]) | A coordinate or frame in the FK4 system.
`FK4NoETerms`(*args[, copy, ...]) | A coordinate or frame in the FK4 system, but with the E-terms of aberration removed.
`FK5`(*args[, copy, representation_type, ...]) | A coordinate or frame in the FK5 system.
`FunctionTransform`(func, fromsys, tosys[, ...]) | A coordinate transformation defined by a function that accepts a coordinate object and returns the transformed coordinate object.
`FunctionTransformWithFiniteDifference`(func, ...) | Transformation based on functions using finite difference for velocities.
`GCRS`(*args[, copy, representation_type, ...]) | A coordinate or frame in the Geocentric Celestial Reference System (GCRS).
`GRS80GeodeticRepresentation`(lon[, lat, ...]) | Representation of points in GRS80 3D geodetic coordinates.
`Galactic`(*args[, copy, representation_type, ...]) | A coordinate or frame in the Galactic coordinate system.
`GalacticLSR`(*args[, copy, ...]) | A coordinate or frame in the Local Standard of Rest (LSR), axis-aligned to the Galactic frame.
`Galactocentric`(*args, **kwargs) | A coordinate or frame in the Galactocentric system.
`GenericFrame`(frame_attrs) | A frame object that can't store data but can hold any arbitrary frame attributes.
`GeocentricMeanEcliptic`(*args[, copy, ...]) | Geocentric mean ecliptic coordinates.
`GeocentricTrueEcliptic`(*args[, copy, ...]) | Geocentric true ecliptic coordinates.
`HADec`(*args, **kwargs) | A coordinate or frame in the Hour Angle-Declination system (Equatorial coordinates) with respect to the WGS84 ellipsoid.
`HCRS`(*args[, copy, representation_type, ...]) | A coordinate or frame in a Heliocentric system, with axes aligned to ICRS.
`HeliocentricEclipticIAU76`(*args[, copy, ...]) | Heliocentric mean (IAU 1976) ecliptic coordinates.
`HeliocentricMeanEcliptic`(*args[, copy, ...]) | Heliocentric mean ecliptic coordinates.
`HeliocentricTrueEcliptic`(*args[, copy, ...]) | Heliocentric true ecliptic coordinates.
`ICRS`(*args[, copy, representation_type, ...]) | A coordinate or frame in the ICRS system.
`ITRS`(*args[, copy, representation_type, ...]) | A coordinate or frame in the International Terrestrial Reference System (ITRS).
`IllegalHourError`(hour) | Raised when an hour value is not in the range [0,24).
`IllegalHourWarning`(hour[, alternativeactionstr]) | Raised when an hour value is 24.
`IllegalMinuteError`(minute) | Raised when an minute value is not in the range [0,60].
`IllegalMinuteWarning`(minute[, ...]) | Raised when a minute value is 60.
`IllegalSecondError`(second) | Raised when an second value (time) is not in the range [0,60].
`IllegalSecondWarning`(second[, ...]) | Raised when a second value is 60.
`LSR`(*args[, copy, representation_type, ...]) | A coordinate or frame in the Local Standard of Rest (LSR).
`LSRD`(*args[, copy, representation_type, ...]) | A coordinate or frame in the Dynamical Local Standard of Rest (LSRD).
`LSRK`(*args[, copy, representation_type, ...]) | A coordinate or frame in the Kinematic Local Standard of Rest (LSR).
`Latitude`(angle[, unit]) | Latitude-like angle(s) which must be in the range -90 to +90 deg.
`Longitude`(angle[, unit, wrap_angle]) | Longitude-like angle(s) which are wrapped within a contiguous 360 degree range.
`NonRotationTransformationError`(frame_to, ...) | Raised for transformations that are not simple rotations.
`NonRotationTransformationWarning`(frame_to, ...) | Emitted for transformations that are not simple rotations.
`PhysicsSphericalDifferential`(d_phi[, ...]) | Differential(s) of 3D spherical coordinates using physics convention.
`PhysicsSphericalRepresentation`(phi[, theta, ...]) | Representation of points in 3D spherical coordinates (using the physics convention of using `phi` and `theta` for azimuth and inclination from the pole).
`PrecessedGeocentric`(*args[, copy, ...]) | A coordinate frame defined in a similar manner as GCRS, but precessed to a requested (mean) equinox.
`QuantityAttribute`([default, ...]) | A frame attribute that is a quantity with specified units and shape (optionally).
`RadialDifferential`(*args, **kwargs) | Differential(s) of radial distances.
`RadialRepresentation`(distance[, ...]) | Representation of the distance of points from the origin.
`RangeError` | Raised when some part of an angle is out of its valid range.
`RepresentationMapping`(reprname, framename[, ...]) | This `NamedTuple` is used with the `frame_specific_representation_info` attribute to tell frames what attribute names (and default units) to use for a particular representation.
`SkyCoord`(*args[, copy]) | High-level object providing a flexible interface for celestial coordinate representation, manipulation, and transformation between systems.
`SkyCoordInfo`([bound]) |
`SkyOffsetFrame`(*args, **kwargs) | A frame which is relative to some specific position and oriented to match its frame.
`SpectralCoord`(value[, unit, observer, ...]) | A spectral coordinate with its corresponding unit.
`SpectralQuantity`(value[, unit, ...]) | One or more value(s) with spectral units.
`SphericalCosLatDifferential`(d_lon_coslat[, ...]) | Differential(s) of points in 3D spherical coordinates.
`SphericalDifferential`(d_lon[, d_lat, ...]) | Differential(s) of points in 3D spherical coordinates.
`SphericalRepresentation`(lon[, lat, ...]) | Representation of points in 3D spherical coordinates.
`StaticMatrixTransform`(matrix, fromsys, tosys) | A coordinate transformation defined as a 3 x 3 cartesian transformation matrix.
`StokesCoord`(stokes[, copy]) | A representation of stokes coordinates with helpers for converting to profile names.
`StokesSymbol`([symbol, description]) | Symbol for a Stokes coordinate.
`Supergalactic`(*args[, copy, ...]) | Supergalactic Coordinates (see Lahav et al. 2000, <https://ui.adsabs.harvard.edu/abs/2000MNRAS.312..166L>, and references therein).
`TEME`(*args[, copy, representation_type, ...]) | A coordinate or frame in the True Equator Mean Equinox frame (TEME).
`TETE`(*args[, copy, representation_type, ...]) | An equatorial coordinate or frame using the True Equator and True Equinox (TETE).
`TimeAttribute`([default, ...]) | Frame attribute descriptor for quantities that are Time objects.
`TransformGraph`() | A graph representing the paths between coordinate frames.
`UnitSphericalCosLatDifferential`(d_lon_coslat) | Differential(s) of points on a unit sphere.
`UnitSphericalDifferential`(d_lon[, d_lat, copy]) | Differential(s) of points on a unit sphere.
`UnitSphericalRepresentation`(lon[, lat, ...]) | Representation of points on a unit sphere.
`UnknownSiteException`(site, attribute[, ...]) |
`WGS72GeodeticRepresentation`(lon[, lat, ...]) | Representation of points in WGS72 3D geodetic coordinates.
`WGS84GeodeticRepresentation`(lon[, lat, ...]) | Representation of points in WGS84 3D geodetic coordinates.
`galactocentric_frame_defaults`() | Global setting of default values for the frame attributes in the `Galactocentric` frame.
`solar_system_ephemeris`() | Default ephemerides for calculating positions of Solar-System bodies.

### Class Inheritance Diagram