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:
astropy.table.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
(self, i)Source for CIP correction.
dcip_xy
(self, jd1[, jd2, return_status])Interpolate CIP corrections in IERS Table for given dates.
mjd_utc
(self, 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
(self, i)Source for polar motion.
pm_xy
(self, jd1[, jd2, return_status])Interpolate polar motions from IERS Table for given dates.
ut1_utc
(self, jd1[, jd2, return_status])Interpolate UT1-UTC corrections in IERS Table for given dates.
ut1_utc_source
(self, i)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
(self, jd1, jd2=0.0, return_status=False)[source]¶ Interpolate CIP corrections in IERS Table for given dates.
- Parameters
- jd1float, float array, or Time object
first part of two-part JD, or Time object
- jd2float or 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.
- Returns
- D_xQuantity with angle units
x component of CIP correction for the requested times
- D_yQuantity with angle units
y component of CIP correction for the requested times
- statusint or 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
-
mjd_utc
(self, jd1, jd2=0.0)[source]¶ Turn a time to MJD, returning integer and fractional parts.
- Parameters
- jd1float, array, or Time
first part of two-part JD, or Time object
- jd2float or array, optional
second part of two-part JD. Default is 0., ignored if jd1 is
Time
.
- Returns
- mjdfloat or array
integer part of MJD
- utcfloat or array
fractional part of MJD
-
classmethod
open
(file=None, cache=False, **kwargs)[source]¶ Open an IERS table, reading it from a file if not loaded before.
- Parameters
- filestr or 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.
- Returns
- 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
(self, jd1, jd2=0.0, return_status=False)[source]¶ Interpolate polar motions from IERS Table for given dates.
- Parameters
- jd1float, float array, or Time object
first part of two-part JD, or Time object
- jd2float or 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.
- Returns
- PM_xQuantity with angle units
x component of polar motion for the requested times
- PM_yQuantity with angle units
y component of polar motion for the requested times
- statusint or 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
(self, jd1, jd2=0.0, return_status=False)[source]¶ Interpolate UT1-UTC corrections in IERS Table for given dates.
- Parameters
- jd1float, float array, or Time object
first part of two-part JD, or Time object
- jd2float or 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.
- Returns
- ut1_utcfloat or float array
UT1-UTC, interpolated in IERS Table
- statusint or 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
-