Epoch¶
- class sofia_redux.scan.coordinate_systems.epoch.epoch.Epoch(equinox=None, immutable=False)[source]¶
Bases:
ABC
Initialize an astronomical epoch.
An epoch defines a time or set of times when an observation occurred. This is important when converting between an apparent equinox (time at when a celestial object was observed) and a standard equinox such as J2000.0 (January 1, 2000 at 12:00 TT). The equinox if defined as the two places on the celestial sphere at which the ecliptic intersects with the celestial equator. The Sun’s ascending node is used as this origin for celestial coordinate systems, but moves westward wrt the celestial sphere due to perturbing forces. An epoch defines the date for which the position of a celestial object applies. Therefore, astronomical coordinates require both the date of the equinox and the epoch.
The current standard for the equinox and epoch is J2000.0 with “J” signifying the Julian epoch. Before 1984, the standard was B1950.0 with “B” signifying the Besselian epoch.
- Parameters:
- equinoxparameter, optional
The given equinox can be a string, int, float, Time, Header, FK4, FK5, or Epoch, or numpy.ndarray or list
- immutablebool, optional
If
True
, the equinox will be fixed and cannot be altered by standard methods.
Attributes Summary
Return the Julian year.
Return whether the epoch if Julian (True) or Besselian (False).
Return the Julian year.
Return the equinox MJD.
Return the number of dimensions of the time.
Return the shape of the time array.
Return
True
if the epoch represents a single time.Return the number of time measurements.
Return the equinox year.
Methods Summary
copy
()Return a copy of the Epoch.
edit_header
(header[, alt])Edit a FITS header with the epoch data.
Return a copy of the epoch without times.
Get a Besselian representation of the epoch.
get_epoch
(epoch)Return an epoch for a given input.
get_equinox
([equinox])Return an astropy equinox frame from the given input.
get_equinox_from_header
(header[, alt])Return an equinox from a FITS header.
get_indices
(indices)Return selected times for given indices.
Get a Julian representation of the epoch.
set_mjd
(mjd)Set the MJD for the epoch.
set_year
(year)Set the year values.
Attributes Documentation
- besselian_year¶
Return the Julian year.
- Returns:
- float or numpy.ndarray
- default_epoch = 'J2000'¶
- default_format = 'jyear'¶
- is_julian¶
Return whether the epoch if Julian (True) or Besselian (False).
- Returns:
- bool
- julian_year¶
Return the Julian year.
- Returns:
- float or numpy.ndarray
- mjd¶
Return the equinox MJD.
- Returns:
- float or numpy.ndarray (float)
- ndim¶
Return the number of dimensions of the time.
- Returns:
- int
- shape¶
Return the shape of the time array.
- Returns:
- tuple (int)
- size¶
Return the number of time measurements.
- Returns:
- int
- year¶
Return the equinox year.
- Returns:
- float or numpy.ndarray (float)
Methods Documentation
- edit_header(header, alt='')[source]¶
Edit a FITS header with the epoch data.
- Parameters:
- headerfits.header.Header
- altstr, optional
The optional alternate system.
- Returns:
- None
- classmethod get_epoch(epoch)[source]¶
Return an epoch for a given input.
- Parameters:
- epochthing
The str, int, float, Time, Epoch for which to get the epoch.
- Returns:
- JulianEpoch or BesselianEpoch
- classmethod get_equinox(equinox=None)[source]¶
Return an astropy equinox frame from the given input.
- Parameters:
- equinoxparameter
The given equinox can be a string, int, float, Time, Header, FK4, FK5, or Epoch, or numpy.ndarray or list
- Returns:
- equinoxastropy.units.Time
- classmethod get_equinox_from_header(header, alt='')[source]¶
Return an equinox from a FITS header.
- Parameters:
- headerastropy.io.fits.header.Header
The header to read.
- altstr, optional
The optional alternate system.
- Returns:
- equinoxastropy.units.Time
- get_indices(indices)[source]¶
Return selected times for given indices.
- Parameters:
- indicesslice or list or int or numpy.ndarray (int) or None
The indices to extract. If
None
, an empty copy of the epoch will be returned
- Returns:
- Epoch
- set_mjd(mjd)[source]¶
Set the MJD for the epoch.
- Parameters:
- mjdint or float or Time or numpy.ndarray
Note that if a int or float value is provided, those MJD values will be assumed to be in UTC scale. If necessary, conversion to TT (Terrestrial Time) will occur if the current equinox is also in TT (default).
- Returns:
- None