EquatorialCoordinates¶
- class sofia_redux.scan.coordinate_systems.equatorial_coordinates.EquatorialCoordinates(coordinates=None, unit='degree', copy=True, epoch=<sofia_redux.scan.coordinate_systems.epoch.epoch.JulianEpoch object>)[source]¶
Bases:
PrecessingCoordinates
Initialize equatorial coordinates.
Equatorial coordinates are precessing celestial coordinates represented as spherical coordinates with the origin at the center of the Earth. The longitude (RA or right ascension) measure the angular distance of an object eastward along the celestial equator from the vernal equinox to the hour angle passing through the object. The latitude (DEC or declination) measures the angular distance of an object perpendicular to the celestial equator with north taken as positive.
- 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.
- epochEpoch or str or int or float or Time or fits.Header, optional
Information from which to set the epoch for these coordinates.
Attributes Summary
Return the Declination coordinate(s).
Return an equatorial pole.
Return the string prefix for latitude (DEC).
Return the string prefix for longitude (RA).
Return the Right Ascension coordinate(s).
Return the two-letter code for the coordinate system.
Return the zero longitude coordinate.
Methods Summary
convert
(from_coordinates, to_coordinates)Convert one type of coordinates to another.
copy
()Return a copy of the equatorial coordinates.
edit_header
(header, key_stem[, alt])Edit the header with equatorial coordinate information.
from_equatorial
(coordinates)Set the equatorial coordinates from those given.
Return the equatorial pole.
Return the equatorial position angle.
get_parallactic_angle
(site, lst)Return the parallactic angle for the coordinates.
Return the zero longitude coordinate.
plot
(*args, **kwargs)Plot the coordinates.
precess_to_epoch
(new_epoch)Precess from one epoch to another.
set_dec
(dec[, copy])Set the Declination values.
set_ra
(ra[, copy])Set the Right Ascension values.
Setup the system for the coordinates.
to_equatorial
([coordinates])Set the given coordinates to these equatorial coordinates.
to_horizontal
(site, lst[, equatorial, ...])Convert equatorial coordinates to horizontal coordinates.
to_horizontal_offset
(offset, position_angle)Convert an equatorial offset to a horizontal offset.
Attributes Documentation
- EAST = -1¶
- NORTH = 1¶
- SOUTH = -1¶
- WEST = 1¶
- ZERO_LONGITUDE = <Quantity 0. deg>¶
- dec¶
Return the Declination coordinate(s).
- Returns:
- declinationunits.Quantity
- equatorial_pole¶
Return an equatorial pole.
- Returns:
- poleEquatorialCoordinates
- fits_latitude_stem¶
Return the string prefix for latitude (DEC).
- Returns:
- str
- fits_longitude_stem¶
Return the string prefix for longitude (RA).
- Returns:
- str
- ra¶
Return the Right Ascension coordinate(s).
- Returns:
- right_ascensionunits.Quantity
- two_letter_code¶
Return the two-letter code for the coordinate system.
- Returns:
- str
- zero_longitude¶
Return the zero longitude coordinate.
- Returns:
- longitudeunits.Quantity
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
- edit_header(header, key_stem, alt='')[source]¶
Edit the header with equatorial coordinate information.
- Parameters:
- headerfits.Header
The header to modify.
- key_stemstr
The name of the header key to update.
- altstr, optional
The alternative coordinate system.
- Returns:
- None
- from_equatorial(coordinates)[source]¶
Set the equatorial coordinates from those given.
- Parameters:
- coordinatesEquatorialCoordinates
- Returns:
- None
- classmethod get_equatorial_pole()[source]¶
Return the equatorial pole.
- Returns:
- poleEquatorialCoordinates
- get_equatorial_position_angle()[source]¶
Return the equatorial position angle.
- Returns:
- position_angleunits.Quantity
- get_parallactic_angle(site, lst)[source]¶
Return the parallactic angle for the coordinates.
- Parameters:
- siteGeodeticCoordinates
The site coordinates.
- lstunits.Quantity
The local sidereal time.
- Returns:
- angleunits.Quantity
- classmethod get_zero_longitude()[source]¶
Return the zero longitude coordinate.
- Returns:
- lonunits.Quantity (float)
- plot(*args, **kwargs)[source]¶
Plot the coordinates.
- Parameters:
- argsvalues
Optional positional parameters to pass into pyplot.plot.
- kwargsdict, optional
Optional keyword arguments.
- Returns:
- None
- precess_to_epoch(new_epoch)[source]¶
Precess from one epoch to another.
- Parameters:
- new_epochEpoch
- Returns:
- None
- set_dec(dec, copy=True)[source]¶
Set the Declination values.
- Parameters:
- decunits.Quantity
- copybool, optional
If
True
, copy the coordinates.
- Returns:
- None
- set_ra(ra, copy=True)[source]¶
Set the Right Ascension values.
- Parameters:
- raunits.Quantity
- copybool, optional
If
True
, copy the coordinates.
- Returns:
- None
- to_equatorial(coordinates=None)[source]¶
Set the given coordinates to these equatorial coordinates.
- Parameters:
- coordinatesEquatorialCoordinates, optional
The coordinates to convert. If not supplied, defaults to this.
- Returns:
- coordinatesEquatorialCoordinates
- to_horizontal(site, lst, equatorial=None, horizontal=None)[source]¶
Convert equatorial coordinates to horizontal coordinates.
- Parameters:
- siteGeodeticCoordinates
The site coordinates.
- lstunits.Quantity
The local sidereal time.
- equatorialEquatorialCoordinates, optional
The equatorial coordinates to convert. The default are these coordinates.
- horizontalHorizontalCoordinates, optional
The horizontal coordinates to convert to. The default is a fresh set of HorizontalCoordinates.
- Returns:
- horizontalHorizontalCoordinates
The equatorial coordinates as a horizontal representation.
- classmethod to_horizontal_offset(offset, position_angle, in_place=True)[source]¶
Convert an equatorial offset to a horizontal offset.
- Parameters:
- offsetCoordinate2D
The 2-dimensional equatorial offsets to convert
- position_angleunits.Quantity
The position angle as a scalar or shape (n,).
- in_placebool, optional
If
True
, perform the conversion in-place. Otherwise, return a copy while leaving the originaloffset
unchanged
- Returns:
- horizontal_offsetCoordinate2D
The (x, y) horizontal offsets.