FileEOPProvider
Load Earth Orientation Parameters from IERS data files.
FileEOPProvider
File-based Earth Orientation Parameter provider.
Loads EOP data from files in standard IERS formats and provides interpolation and extrapolation capabilities.
Example
| import brahe as bh
# Create from C04 file with interpolation
eop = bh.FileEOPProvider.from_c04_file(
"./eop_data/finals2000A.all.csv",
interpolate=True,
extrapolate="Hold"
)
# Create from standard file
eop = bh.FileEOPProvider.from_standard_file(
"./eop_data/finals.all",
interpolate=True,
extrapolate="Zero"
)
# Use default file location
eop = bh.FileEOPProvider.from_default_c04(True, "Hold")
# Set as global provider
bh.set_global_eop_provider_from_file_provider(eop)
# Get EOP data for a specific MJD
mjd = 60310.0
ut1_utc, pm_x, pm_y, dx, dy, lod = eop.get_eop(mjd)
|
Initialize instance.
eop_type method descriptor
Get the EOP data type.
Returns:
| Name | Type | Description |
str | str | |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"EOP type: {eop.eop_type()}")
|
Get the extrapolation method.
Returns:
| Name | Type | Description |
str | str | Extrapolation method string |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"Extrapolation: {eop.extrapolation()}")
|
from_c04_file builtin
Create provider from a C04 format EOP file.
Parameters:
| Name | Type | Description | Default |
filepath | str | | required |
interpolate | bool | Enable interpolation between data points | required |
extrapolate | str | Extrapolation method ("Hold", "Zero", or "Error") | required |
Returns:
| Name | Type | Description |
FileEOPProvider | FileEOPProvider | Provider initialized with C04 file data |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_c04_file("./eop_data/finals2000A.all.csv", True, "Hold")
bh.set_global_eop_provider_from_file_provider(eop)
|
from_default_c04 builtin
Create provider from the default C04 EOP file location.
Parameters:
| Name | Type | Description | Default |
interpolate | bool | Enable interpolation between data points | required |
extrapolate | str | Extrapolation method ("Hold", "Zero", or "Error") | required |
Returns:
| Name | Type | Description |
FileEOPProvider | FileEOPProvider | Provider initialized with default C04 file |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_c04(True, "Hold")
bh.set_global_eop_provider_from_file_provider(eop)
|
from_default_file builtin
Create provider from default EOP file location with specified type.
Parameters:
| Name | Type | Description | Default |
eop_type | str | EOP file type ("C04" or "StandardBulletinA") | required |
interpolate | bool | Enable interpolation between data points | required |
extrapolate | str | Extrapolation method ("Hold", "Zero", or "Error") | required |
Returns:
| Name | Type | Description |
FileEOPProvider | FileEOPProvider | Provider initialized with default file of specified type |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_file("C04", True, "Hold")
bh.set_global_eop_provider_from_file_provider(eop)
|
from_default_standard builtin
Create provider from the default standard IERS EOP file location.
Parameters:
| Name | Type | Description | Default |
interpolate | bool | Enable interpolation between data points | required |
extrapolate | str | Extrapolation method ("Hold", "Zero", or "Error") | required |
Returns:
| Name | Type | Description |
FileEOPProvider | FileEOPProvider | Provider initialized with default standard file |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
bh.set_global_eop_provider_from_file_provider(eop)
|
from_file builtin
Create provider from an EOP file with automatic format detection.
Parameters:
| Name | Type | Description | Default |
filepath | str | | required |
interpolate | bool | Enable interpolation between data points | required |
extrapolate | str | Extrapolation method ("Hold", "Zero", or "Error") | required |
Returns:
| Name | Type | Description |
FileEOPProvider | FileEOPProvider | Provider initialized with file data |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_file("./eop_data/eop.txt", True, "Hold")
bh.set_global_eop_provider_from_file_provider(eop)
|
from_standard_file builtin
Create provider from a standard IERS format EOP file.
Parameters:
| Name | Type | Description | Default |
filepath | str | Path to standard IERS EOP file | required |
interpolate | bool | Enable interpolation between data points | required |
extrapolate | str | Extrapolation method ("Hold", "Zero", or "Error") | required |
Returns:
| Name | Type | Description |
FileEOPProvider | FileEOPProvider | Provider initialized with standard file data |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_standard_file("./eop_data/standard_eop.txt", True, "Hold")
bh.set_global_eop_provider_from_file_provider(eop)
|
get_dxdy method descriptor
Get celestial pole offsets for a given MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Type | Description |
tuple[float, float] | tuple[float, float]: Celestial pole offsets dx and dy in radians |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
dx, dy = eop.get_dxdy(58849.0)
print(f"Celestial pole offsets: dx={dx} rad, dy={dy} rad")
|
get_eop method descriptor
Get all EOP parameters for a given MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Type | Description |
tuple[float, float, float, float, float, float] | tuple[float, float, float, float, float, float]: UT1-UTC, pm_x, pm_y, dx, dy, lod |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
ut1_utc, pm_x, pm_y, dx, dy, lod = eop.get_eop(58849.0)
print(f"EOP: UT1-UTC={ut1_utc}s, PM=({pm_x},{pm_y})rad")
|
get_lod method descriptor
Get length of day offset for a given MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | Length of day offset in seconds |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
lod = eop.get_lod(58849.0)
print(f"Length of day offset: {lod} seconds")
|
get_pm method descriptor
Get polar motion components for a given MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Type | Description |
tuple[float, float] | tuple[float, float]: Polar motion x and y components in radians |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
pm_x, pm_y = eop.get_pm(58849.0)
print(f"Polar motion: x={pm_x} rad, y={pm_y} rad")
|
get_ut1_utc method descriptor
Get UT1-UTC time difference for a given MJD.
Parameters:
| Name | Type | Description | Default |
mjd | float | | required |
Returns:
| Name | Type | Description |
float | float | UT1-UTC time difference in seconds |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
ut1_utc = eop.get_ut1_utc(58849.0)
print(f"UT1-UTC: {ut1_utc} seconds")
|
interpolation method descriptor
Check if interpolation is enabled.
Returns:
| Name | Type | Description |
bool | bool | True if interpolation is enabled |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"interpolation: {eop.interpolation()}")
|
is_initialized method descriptor
Check if the provider is initialized.
Returns:
| Name | Type | Description |
bool | bool | |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"is_initialized: {eop.is_initialized()}")
|
len method descriptor
Get the number of EOP data points.
Returns:
| Name | Type | Description |
int | int | Number of EOP data points |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"EOP data points: {eop.len()}")
|
mjd_last_dxdy method descriptor
Get the last Modified Julian Date with dx/dy data.
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"mjd_last_dxdy: {eop.mjd_last_dxdy()}")
|
mjd_last_lod method descriptor
Get the last Modified Julian Date with LOD data.
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"Last MJD with LOD: {eop.mjd_last_lod()}")
|
mjd_max method descriptor
Get the maximum Modified Julian Date in the dataset.
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"mjd_max: {eop.mjd_max()}")
|
mjd_min method descriptor
Get the minimum Modified Julian Date in the dataset.
Returns:
| Name | Type | Description |
float | float | |
Example
| import brahe as bh
eop = bh.FileEOPProvider.from_default_standard(True, "Hold")
print(f"Minimum MJD: {eop.mjd_min()}")
|
Overview
FileEOPProvider loads EOP data from files in either Standard or C04 format provided by the International Earth Rotation and Reference Systems Service (IERS).
Module: brahe.eop
Data Sources: - Standard Format: finals2000A.all - Combined rapid + predicted data - C04 Format: eopc04_IAU2000.XX - Long-term historical data
Creating a Provider
From Default Files
| import brahe as bh
# Use default standard format file
provider = bh.FileEOPProvider.from_default_standard()
# Use default C04 format file
provider = bh.FileEOPProvider.from_default_c04()
|
From Custom Files
| import brahe as bh
# Load from custom standard file
provider = bh.FileEOPProvider.from_standard_file(
"/path/to/finals2000A.all",
interpolate=True,
extrapolate="Hold"
)
# Load from custom C04 file
provider = bh.FileEOPProvider.from_c04_file(
"/path/to/eopc04.XX",
interpolate=True,
extrapolate="Hold"
)
|
Configuration Options
Interpolation
interpolate: bool - Enable/disable interpolation between data points
True: Linear interpolation for dates between data points (recommended) False: Use nearest data point (step function)
extrapolate: str - Behavior when querying dates outside data range
"Hold": Use first/last values for dates before/after data range "Zero": Return zero for all EOP values outside range "Error": Raise an error if date is outside range
Usage with Global EOP
| import brahe as bh
# Create provider from file
provider = bh.FileEOPProvider.from_default_standard(
interpolate=True,
extrapolate="Hold"
)
# Set as global provider
bh.set_global_eop_provider(provider)
# Now all frame transformations use this EOP data
epoch = bh.Epoch.from_datetime(2024, 1, 1, 0, 0, 0.0, 0.0, bh.TimeSystem.UTC)
pos_eci = [7000000.0, 0.0, 0.0]
pos_ecef = bh.position_eci_to_ecef(epoch, pos_eci)
|
Downloading EOP Files
| import brahe as bh
# Download latest standard EOP file
filepath = bh.download_standard_eop_file("./data")
# Download latest C04 EOP file
filepath = bh.download_c04_eop_file("./data")
# Use downloaded file
provider = bh.FileEOPProvider.from_standard_file(filepath)
|
See Also