Skip to main content

Python Orbit Ephemeris Message tools

Python tools for working with Orbit Ephemeris Messages (OEMs).

Development Status

GitHub Release GitHub

GitHub last commit Pipeline Status Coverage Status

Installation

The oem package is available through pip.

pip install oem

Documentation

See the full documentation here

Basic Usage

The OrbitEphemerisMessage class is the primary interface for OEM Files.

from oem import OrbitEphemerisMessage

ephemeris = OrbitEphemerisMessage.open("input_file.oem")

Each OEM is made up of one or more segments of state and optional covariance data. The OrbitEphemerisMessage class provides iterables for both.

for segment in ephemeris:
    for state in segment:
        print(state.epoch, state.position, state.velocity, state.acceleration)

    for covariance in segment.covariances:
        print(covariance.epoch, covariance.matrix)

All vectors and matrices are numpy arrays.

It is also possible to retrieve a complete list of states and covariances through the .states and .covariances properties. These attributes streamline interaction with single-segment ephemerides.

for state in ephemeris.states:
    print(state.epoch, state.position, state.velocity)
for covariance in ephemeris.covariances:
    print(covariance.epoch, covariance.matrix)

To sample a state at an arbitrary epoch, simply call the ephemeris with an astropy Time object

epoch = Time("2020-01-01T00:00:00", scale="utc")
sampled_state = ephemeris(epoch)

Note that this type of sampling is only supported if the time system of the target ephemeris is supported by astropy Time objects. The .steps method of both OrbitEphemerisMessage and EphemerisSegment objects enables iterable, equal-time sampling of ephemeris data. The following example samples an OEM at a 60-second interval.

for state in oem.steps(60)
    pass

The above example works for both single- and multi-segment OEMs, however the step sizes may vary at the boundary of the segments. To get consistent step sizes with multiple segments, use the segment interface directly.

for segment in oem:
    for state in segment.steps(60):
        pass

The OrbitEphemerisMessage facilitates writing of OEMs. To save an already-open OEM, use .save_as:

ephemeris.save_as("output.oem", file_format="xml")

To convert an ephemeris from one type to another, use the .convert class method.

OrbitEphemerisMessage.convert("input_file.oem", "output_file.oem", "kvn")

Reference Standards

This implementation follows the CCSDS recommended standards for Orbit Data Messages.

[1] Orbit Data Messages, CCSDS 502.0-B-3, 2023. Available: https://ccsds.org/wp-content/uploads/gravity_forms/5-448e85c647331d9cbaf66c096458bdd5/2025/01//502x0b3e1.pdf

[2] XML Specification for Navigation Data Messages, CCSDS 505.0-B-3, 2023. Available: https://ccsds.org/wp-content/uploads/gravity_forms/5-448e85c647331d9cbaf66c096458bdd5/2025/01//505x0b3e2.pdf

Release files for oem 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oem 0.4.5
File Size Uploaded
oem-0.4.5.tar.gz 25.7 kB Details

Release files / oem-0.4.5.tar.gz

Download URL oem-0.4.5.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2760658faa95b7dbdb2af292e3af3801e6e13bd18418958e46f66a46b6ec0f9a
BLAKE2b-256 checksum
How to use checksums
ad0ca1df7078292cbc7efecefe428f7d67f3af730b1cf8d781e096a1a15089d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.4.5 This release

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page