Skip to content

Data

data

Finals2000

Accessor for the IERS finals.2000A Earth-Orientation table.

Provides interpolated EOP records at any UTC epoch within the table range. This object is stateless — every lookup goes through the process-global table loaded from data/finals.2000. Reachable as finals2000.

at(mjd_utc)

Interpolate the EOP record at a UTC epoch.

Interpolates with a 4-point barycentric (cubic Lagrange) stencil over the integer-MJD entries that bracket mjd_utc in the finals.2000A table; integer MJDs return the table row directly.

Parameters:

Name Type Description Default
mjd_utc float

UTC epoch [MJD days since 1858-11-17].

required

Returns:

Type Description
Finals2000Fields

Interpolated EOP record at mjd_utc.

Raises:

Type Description
ValueError

If mjd_utc is outside the table range or the table has not been initialized.

Finals2000Fields

A single record from the IERS finals.2000A Earth-Orientation table.

Returned by at and represents the EOP values interpolated to the requested epoch with a 4-point barycentric (cubic Lagrange) stencil. All angular quantities are in radians; ut1_utc is in seconds.

Attributes:

Name Type Description
ut1_utc float

UT1−UTC offset [s].

ut1_utc_error float

Formal uncertainty of ut1_utc [s].

polar_x float

Celestial pole x-offset xₚ [rad].

polar_x_error float

Formal uncertainty of polar_x [arcsec].

polar_y float

Celestial pole y-offset yₚ [rad].

polar_y_error float

Formal uncertainty of polar_y [arcsec].

dx float

CIP dX correction to IAU 2006/2000A X coordinate [rad].

dx_error float

Formal uncertainty of dx [mas].

dy float

CIP dY correction to IAU 2006/2000A Y coordinate [rad].

dy_error float

Formal uncertainty of dy [mas].

dx property

IAU 2006/2000A CIP dX correction [rad].

Add directly to the X coordinate returned by erfa.xys06a to obtain the observed CIP position.

dx_error property

Formal uncertainty of dx [mas].

dy property

IAU 2006/2000A CIP dY correction [rad].

Add directly to the Y coordinate returned by erfa.xys06a to obtain the observed CIP position.

dy_error property

Formal uncertainty of dy [mas].

polar_x property

Celestial pole x-offset xₚ (IERS Bulletin A, IAU 2000) [rad].

Positive xₚ tilts the pole toward the Greenwich meridian (0°E).

polar_x_error property

Formal uncertainty of polar_x [arcsec].

polar_y property

Celestial pole y-offset yₚ (IERS Bulletin A, IAU 2000) [rad].

Positive yₚ tilts the pole toward 270°E (the 90°W meridian).

polar_y_error property

Formal uncertainty of polar_y [arcsec].

ut1_utc property

UT1−UTC offset [s].

Positive values indicate UT1 is ahead of UTC. Magnitude never exceeds 0.9 s because leap seconds keep |UT1−UTC| < 0.9 s.

ut1_utc_error property

Formal uncertainty of ut1_utc [s].

KepLimeData

Registry of bundled astrodynamics data tables.

Class-level attribute access provides a stateless handle to each supported table. Use the handle's lookup methods (e.g. at) to retrieve interpolated values at a particular epoch.

Attributes:

Name Type Description
finals2000 Finals2000

IERS IAU 2000A Earth-Orientation table accessor (polar motion xₚ/yₚ, UT1−UTC, CIP offsets dX/dY).

data_refresh_pending()

Reports whether any in-memory data table is stale relative to disk.

Returns True when at least one managed required file on disk has a newer modification time than the in-memory cache loaded by this process. Long-running applications can poll this to decide when to restart and pick up newly downloaded data.

Returns:

Type Description
bool

True when at least one in-memory cache is older than its

bool

on-disk file; False otherwise.

ensure_data_file(filename, force_update=False)

Ensures a single managed data file is present on disk.

Downloads the file when missing or stale (subject to the auto-update policy and the per-file max_age). Unknown filenames simply return the path within the data directory without downloading.

The Python GIL is released during any network or filesystem work.

Parameters:

Name Type Description Default
filename str

Bare filename (e.g. "finals.2000") to ensure.

required
force_update bool

When True, redownload the file regardless of cache freshness.

False

Returns:

Type Description
str

Absolute path to the data file on disk.

Raises:

Type Description
ValueError

If the file cannot be downloaded and is required.

get_data_dir()

Returns the directory path keplime uses for bundled data files.

Resolved from (in order): the KEPLIME_ASSET_DIRECTORY environment variable, the legacy KEPLIME_DATA_DIR environment variable, or a platform-specific default (%LOCALAPPDATA%/keplime on Windows, ~/Library/Application Support/keplime on macOS, or $XDG_DATA_HOME/keplime / ~/.local/share/keplime on Linux).

Returns:

Type Description
str

Absolute path to the data directory.

load_data_files(force_update=False)

Downloads (if necessary) and preloads all required data files.

Ensures that every required asset (IERS finals.1980 / finals.2000A, leap-second table, JPL Sun/Moon ephemerides, Celestrak space weather) is present in get_data_dir, refreshing stale copies in the background, then preloads the EOP tables and ephemerides into the process-global caches.

The Python GIL is released for the duration of the call so the download and preload can run concurrently with other Python threads.

Parameters:

Name Type Description Default
force_update bool

When True, redownload every managed file (including the optional JB2008 SOLFSMY/DTC inputs) regardless of cache freshness.

False

Raises:

Type Description
ValueError

If a required file cannot be downloaded or parsed.

set_data_dir(path)

Sets the directory keplime uses for bundled data files.

Creates the directory if it does not exist and updates both the KEPLIME_ASSET_DIRECTORY and the legacy KEPLIME_DATA_DIR environment variables for the current process.

Parameters:

Name Type Description Default
path str

Filesystem path to use as the data directory.

required

Raises:

Type Description
ValueError

If the directory cannot be created or accessed.