Skip to main content
`Ctrl`+`K`

# 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)

  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

  `iers_table` | 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 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.
  `ut1_utc_source`(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()

    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_source(i)

    Source for CIP correction. To be overridden by subclass.

  dcip_xy(jd1, jd2=0.0, return_status=False)

    Interpolate CIP corrections in IERS Table for given dates.

    Parameters:
      jd1 `python:float`, `array` of `python:float`, or `Time` `object`

        first part of two-part JD, or Time object

      jd2 `python:float` or `python:float` `array`, optional

        second part of two-part JD (default 0., ignored if jd1 is Time)

      return_status bool

        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_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` or `python: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(jd1, jd2=0.0)

    Turn a time to MJD, returning integer and fractional parts.

    Parameters:
      jd1 `python:float`, `array`, or `Time`

        first part of two-part JD, or Time object

      jd2 `python:float` or `array`, optional

        second part of two-part JD. Default is 0., ignored if jd1 is `Time`.

    Returns:
      mjd `python:float` or `array`

        integer part of MJD

      utc `python:float` or `array`

        fractional part of MJD

  classmethod open(file=None, cache=False, **kwargs)

    Open an IERS table, reading it from a file if not loaded before.

    Parameters:
      file `python:str` or `python: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 the `read` class method.

      cache bool

        Whether to use cache. Defaults to False, since IERS files are regularly updated.

    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 to `open` will return this stored table if `file=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_source(i)

    Source for polar motion. To be overridden by subclass.

  pm_xy(jd1, jd2=0.0, return_status=False)

    Interpolate polar motions from IERS Table for given dates.

    Parameters:
      jd1 `python:float`, `array` of `python:float`, or `Time` `object`

        first part of two-part JD, or Time object

      jd2 `python:float` or `python:float` `array`, optional

        second part of two-part JD. Default is 0., ignored if jd1 is `Time`.

      return_status bool

        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_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` or `python: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(jd1, jd2=0.0, return_status=False)

    Interpolate UT1-UTC corrections in IERS Table for given dates.

    Parameters:
      jd1 `python:float`, `array` of `python:float`, or `Time` `object`

        first part of two-part JD, or Time object

      jd2 `python:float` or `python:float` `array`, optional

        second part of two-part JD. Default is 0., ignored if jd1 is `Time`.

      return_status bool

        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_utc `python:float` or `python:float` `array`

        UT1-UTC, interpolated in IERS Table

      status `python:int` or `python: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_source(i)

    Source for UT1-UTC. To be overridden by subclass.