IERS#
- class astropy.utils.iers.IERS(data=None, masked=False, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True, units=None, descriptions=None, **kwargs)[source]#
Bases:
QTableGeneric IERS table class, defining interpolation functions.
Sub-classed from
astropy.table.QTable. The table should hold columns ‘MJD’, ‘UT1_UTC’, ‘dX_2000A’/’dY_2000A’, and ‘PM_x’/’PM_y’.Attributes Summary
Cached table, returned if
openis called without arguments.Property to provide the current time, but also allow for explicitly setting the _time_now attribute for testing purposes.
Methods Summary
close()Remove the IERS table from the class.
dcip_source(i)Source for CIP correction.
dcip_xy(jd1[, jd2, return_status])Interpolate CIP corrections in IERS Table for given dates.
mjd_utc(jd1[, jd2])Turn a time to MJD, returning integer and fractional parts.
open([file, cache])Open an IERS table, reading it from a file if not loaded before.
pm_source(i)Source for polar motion.
pm_xy(jd1[, jd2, return_status])Interpolate polar motions from IERS Table for given dates.
ut1_utc(jd1[, jd2, return_status])Interpolate UT1-UTC corrections in IERS Table for given dates.
Source for UT1-UTC.
Attributes Documentation
- iers_table = None#
Cached table, returned if
openis called without arguments.
- time_now#
Property to provide the current time, but also allow for explicitly setting the _time_now attribute for testing purposes.
Methods Documentation
- classmethod close()[source]#
Remove the IERS table from the class.
This allows the table to be re-read from disk during one’s session (e.g., if one finds it is out of date and has updated the file).
- dcip_xy(jd1, jd2=0.0, return_status=False)[source]#
Interpolate CIP corrections in IERS Table for given dates.
- Parameters:
- jd1
float,arrayoffloat, orTimeobject first part of two-part JD, or Time object
- jd2
floatorfloatarray, optional second part of two-part JD (default 0., ignored if jd1 is Time)
- return_statusbool
Whether to return status values. If False (default), raise
IERSRangeErrorif any time is out of the range covered by the IERS table.
- jd1
- Returns:
- D_x
Quantity[:ref: ‘angle’] x component of CIP correction for the requested times.
- D_y
Quantity[:ref: ‘angle’] y component of CIP correction for the requested times
- status
intorintarray Status values (if
return_status``=``True)::iers.FROM_IERS_Biers.FROM_IERS_Aiers.FROM_IERS_A_PREDICTIONiers.TIME_BEFORE_IERS_RANGEiers.TIME_BEYOND_IERS_RANGE
- D_x
- classmethod open(file=None, cache=False, **kwargs)[source]#
Open an IERS table, reading it from a file if not loaded before.
- Parameters:
- file
strorNone full local or network path to the ascii file holding IERS data, for passing on to the
readclass methods (further optional arguments that are available for some IERS subclasses can be added). If None, use the default location from thereadclass method.- cachebool
Whether to use cache. Defaults to False, since IERS files are regularly updated.
- file
- Returns:
IERSAn IERS table class instance
Notes
On the first call in a session, the table will be memoized (in the
iers_tableclass attribute), and further calls toopenwill return this stored table iffile=None(the default).If a table needs to be re-read from disk, pass on an explicit file location or use the (sub-class) close method and re-open.
If the location is a network location it is first downloaded via download_file.
For the IERS class itself, an IERS_B sub-class instance is opened.
- pm_xy(jd1, jd2=0.0, return_status=False)[source]#
Interpolate polar motions from IERS Table for given dates.
- Parameters:
- jd1
float,arrayoffloat, orTimeobject first part of two-part JD, or Time object
- jd2
floatorfloatarray, optional second part of two-part JD. Default is 0., ignored if jd1 is
Time.- return_statusbool
Whether to return status values. If False (default), raise
IERSRangeErrorif any time is out of the range covered by the IERS table.
- jd1
- Returns:
- PM_x
Quantity[:ref: ‘angle’] x component of polar motion for the requested times.
- PM_y
Quantity[:ref: ‘angle’] y component of polar motion for the requested times.
- status
intorintarray Status values (if
return_status``=``True)::iers.FROM_IERS_Biers.FROM_IERS_Aiers.FROM_IERS_A_PREDICTIONiers.TIME_BEFORE_IERS_RANGEiers.TIME_BEYOND_IERS_RANGE
- PM_x
- ut1_utc(jd1, jd2=0.0, return_status=False)[source]#
Interpolate UT1-UTC corrections in IERS Table for given dates.
- Parameters:
- jd1
float,arrayoffloat, orTimeobject first part of two-part JD, or Time object
- jd2
floatorfloatarray, optional second part of two-part JD. Default is 0., ignored if jd1 is
Time.- return_statusbool
Whether to return status values. If False (default), raise
IERSRangeErrorif any time is out of the range covered by the IERS table.
- jd1
- Returns: