CelestialCoordinates¶
- class sofia_redux.scan.coordinate_systems.celestial_coordinates.CelestialCoordinates(coordinates=None, unit='degree', copy=True)[source]¶
Bases:
SphericalCoordinates
Initialize a CelestialCoordinates object.
Celestial coordinates are used to represent spherical coordinates on the sky with respect to a given pole. The functionality implemented here allows for transformations between spherical coordinates with differing poles or zero-longitude definitions.
- Parameters:
- coordinateslist or tuple or array-like or units.Quantity, optional
The coordinates used to populate the object during initialization. The first (0) value or index should represent longitudinal coordinates, and the second should represent latitude.
- unitunits.Unit or str, optional
The angular unit for the spherical coordinates. The default is ‘degree’.
- copybool, optional
Whether to explicitly perform a copy operation on the input coordinates when storing them into these coordinates. Note that it is extremely unlikely for the original coordinates to be passed in as a reference due to the significant checks performed on them.
Methods Summary
convert
(from_coordinates, to_coordinates)Convert one type of coordinates to another.
convert_from
(coordinates)Convert coordinates from another (or same) system to these coordinates.
convert_from_celestial
(celestial)Convert coordinates from another celestial frame onto this one.
convert_to
(coordinates)Convert coordinates to another system.
convert_to_celestial
(celestial)Convert these coordinates to another celestial system.
copy
()Return a copy of the celestial coordinates.
from_equatorial
(equatorial)Set the celestial coordinates from those given.
Return an equatorial representation of the celestial coordinates.
Return the equatorial class.
Return the equatorial pole coordinates.
Return the equatorial position angle of the celestial coordinates.
get_pole
(inclination, rising_ra[, reference])Get the pole from inclination and rising RA angles.
Return the zero longitude value.
get_zero_longitude_from
(from_coordinates, ...)Return the zero longitude of one coordinates system in another.
to_equatorial
([equatorial])Convert these celestial coordinates to equatorial coordinates.
Methods Documentation
- convert(from_coordinates, to_coordinates)[source]¶
Convert one type of coordinates to another.
The
to_coordinates
will be updated in-place.- Parameters:
- from_coordinatesCelestialCoordinates
- to_coordinatesCelestialCoordinates
- Returns:
- None
- convert_from(coordinates)[source]¶
Convert coordinates from another (or same) system to these coordinates.
- Parameters:
- coordinatesCelestialCoordinates or Coordinate2D
- Returns:
- None
- convert_from_celestial(celestial)[source]¶
Convert coordinates from another celestial frame onto this one.
- Parameters:
- celestialCelestialCoordinates
- Returns:
- None
- convert_to(coordinates)[source]¶
Convert coordinates to another system.
- Parameters:
- coordinatesCelestialCoordinates or Coordinate2D
- Returns:
- None
- convert_to_celestial(celestial)[source]¶
Convert these coordinates to another celestial system.
- Parameters:
- celestialCelestialCoordinates
- Returns:
- None
- from_equatorial(equatorial)[source]¶
Set the celestial coordinates from those given.
- Parameters:
- equatorialEquatorialCoordinates
- Returns:
- None
- get_equatorial()[source]¶
Return an equatorial representation of the celestial coordinates.
- Returns:
- EquatorialCoordinates
- classmethod get_equatorial_class()[source]¶
Return the equatorial class.
- Returns:
- EquatorialCoordinates
- abstract get_equatorial_pole()[source]¶
Return the equatorial pole coordinates.
- Returns:
- EquatorialCoordinates
- get_equatorial_position_angle()[source]¶
Return the equatorial position angle of the celestial coordinates.
- Returns:
- astropy.units.Quantity
- classmethod get_pole(inclination, rising_ra, reference=None)[source]¶
Get the pole from inclination and rising RA angles.
- Parameters:
- inclinationastropy.units.Quantity
The inclination angle.
- rising_raastropy.units.Quantity
The rising Right Ascension.
- referenceCelestialCoordinates, optional
If supplied sets the coordinates in the reference system and converts it to equatorial coordinates.
- Returns:
- poleEquatorialCoordinates
- abstract get_zero_longitude()[source]¶
Return the zero longitude value.
- Returns:
- astropy.units.Quantity
- classmethod get_zero_longitude_from(from_coordinates, to_coordinates)[source]¶
Return the zero longitude of one coordinates system in another.
- Parameters:
- from_coordinatesEquatorialCoordinates
The coordinates from which to determine zero longitude.
- to_coordinatesCelestialCoordinates
The coordinate system in which to return the zero longitude.
- Returns:
- zero_longitudeastropy.units.Quantity
The zero longitude angle.