Skip to content

Data Providers

External data sources for Earth orientation and interpolation.

Earth Orientation Parameters

Earth Orientation Parameters (EOP) are required for accurate transformations involving UT1 (Earth rotation) and polar motion corrections.

Quick Example

import lox_space as lox

# Load EOP data
eop = lox.EOPProvider("/path/to/finals2000A.all.csv")

# Use with time scale conversions
t_tai = lox.Time("TAI", 2024, 1, 1)
t_ut1 = t_tai.to_scale("UT1", provider=eop)

# Use with frame transformations
state_itrf = state.to_frame(lox.Frame("ITRF"), provider=eop)

# Custom interpolation series
import numpy as np
x = [0.0, 1.0, 2.0, 3.0]
y = [0.0, 1.0, 4.0, 9.0]

# Linear interpolation (default)
series = lox.Series(x, y)
print(series.interpolate(1.5))  # ~2.5

# Cubic spline interpolation
series = lox.Series(x, y, method="cubic_spline")
print(series.interpolate(1.5))  # ~2.25

EOPProvider

Earth Orientation Parameters (EOP) data provider.

EOP data is required for accurate transformations involving UT1 and polar motion corrections.

Parameters:

  • *args

    Path(s) to EOP data file(s) (CSV format).

Raises:

  • EopParserError

    If the file cannot be parsed.

  • OSError

    If the file cannot be read.

Examples:

>>> eop = lox.EOPProvider("/path/to/finals2000A.all.csv")
>>> t_ut1 = t_tai.to_scale("UT1", provider=eop)

Series

Interpolation series for 1D data.

Parameters:

  • x

    Array of x values (must be monotonically increasing).

  • y

    Array of y values (same length as x).

  • method

    Interpolation method ("linear" or "cubic_spline").

Examples:

>>> x = [0.0, 1.0, 2.0, 3.0]
>>> y = [0.0, 1.0, 4.0, 9.0]
>>> series = lox.Series(x, y, method="cubic_spline")
>>> series.interpolate(1.5)
2.25

Methods:

  • interpolate

    Interpolate a y value at the given x coordinate.

interpolate

interpolate(xp: float) -> float

Interpolate a y value at the given x coordinate.