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

OMM Support

The oem.omm module supports CCSDS Orbit Mean-Elements Message (OMM) versions 2.0 and 3.0. OMM 1.0 was not defined by the CCSDS standard. OMM 2.0 KVN and the library's compatible single-OMM XML representation are supported alongside the standard OMM 3.0 KVN and XML representations.

from astropy import units as u

from oem.omm import OrbitMeanElementsMessage

omm = OrbitMeanElementsMessage.open("input_file.omm")
oem = omm.to_oem(omm.epoch, omm.epoch + 1 * u.day, 60)

JPL Horizons Support

The oem.horizons module creates ICRF OEMs directly from JPL Horizons vector ephemerides. See the Horizons guide for usage.

Reference Standards

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

[1] Orbit Data Messages, CCSDS 502.0-B-3, 2023. Available: local copy

[2] XML Specification for Navigation Data Messages, CCSDS 505.0-B-3, 2023. Available: local copy

Metadata

Release files for oem 1.0.0

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 1.0.0
File Size Uploaded Provenance Actions
oem-1.0.0.tar.gz 47.5 kB With provenance Details for oem-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oem 1.0.0
File Interpreter ABI Platform Actions
oem-1.0.0-py3-none-any.whl Python 3 none any Details for oem-1.0.0-py3-none-any.whl

Total release size: 89.8 kB

Release files / oem-1.0.0.tar.gz

Download URL oem-1.0.0.tar.gz
Size 47.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1e9de106aefb60ef91f3460a1fc337d3fdc5cd25e2428da331f4ceed6efb16f3
BLAKE2b-256 checksum
How to use checksums
9d6f6589527ca216a13cf53288b1f81f75c85b2ce99896bfbf49ec9e48a5bb85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / oem-1.0.0-py3-none-any.whl

Download URL oem-1.0.0-py3-none-any.whl
Size 42.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d240ad9e03e1ded6127835611d982322588c9bba4090ff23e2579192b9c805c
BLAKE2b-256 checksum
How to use checksums
e383cb8b95c5c5a4d467b82d68a2286f709d45938d3c1fd5956787d5d1363f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for oem 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for oem-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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