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:
QTable
Generic 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
open
is 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
open
is 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
python:float
,array
ofpython:float
, orTime
object
first part of two-part JD, or Time object
- jd2
python:float
orpython:float
array
, 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
IERSRangeError
if 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
python:int
orpython:int
array
Status values (if
return_status``=``True
)::iers.FROM_IERS_B
iers.FROM_IERS_A
iers.FROM_IERS_A_PREDICTION
iers.TIME_BEFORE_IERS_RANGE
iers.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
python:str
orpython:None
full local or network path to the ascii file holding IERS data, for passing on to the
read
class methods (further optional arguments that are available for some IERS subclasses can be added). If None, use the default location from theread
class method.- cachebool
Whether to use cache. Defaults to False, since IERS files are regularly updated.
- file
- Returns:
IERS
An IERS table class instance
Notes
On the first call in a session, the table will be memoized (in the
iers_table
class attribute), and further calls toopen
will 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
python:float
,array
ofpython:float
, orTime
object
first part of two-part JD, or Time object
- jd2
python:float
orpython:float
array
, 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
IERSRangeError
if 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
python:int
orpython:int
array
Status values (if
return_status``=``True
)::iers.FROM_IERS_B
iers.FROM_IERS_A
iers.FROM_IERS_A_PREDICTION
iers.TIME_BEFORE_IERS_RANGE
iers.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
python:float
,array
ofpython:float
, orTime
object
first part of two-part JD, or Time object
- jd2
python:float
orpython:float
array
, 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
IERSRangeError
if any time is out of the range covered by the IERS table.
- jd1
- Returns:
- ut1_utc
python:float
orpython:float
array
UT1-UTC, interpolated in IERS Table
- status
python:int
orpython:int
array
Status values (if
return_status``=``True
)::iers.FROM_IERS_B
iers.FROM_IERS_A
iers.FROM_IERS_A_PREDICTION
iers.TIME_BEFORE_IERS_RANGE
iers.TIME_BEYOND_IERS_RANGE
- ut1_utc