Orbital Ephemeris Message

The primary interface between the oem package and OEM files is the OrbitalEphemerisMessage class. In addition, the package provides objects to represent each component of an OEM ephemeris.

OrbitalEphemerisMessage

See also

Module Ephemeris Components

Module OEM Data Types

Python representation of an Orbital Ephemeris Message.

This class provides the primary interface between the OEM module and an OEM file.

oem.OrbitalEphemerisMessage.header

Object containing the OEM header section.

Type:HeaderSection

Examples

The OrbitalEphemerisMessage class can load directly from a file:

>>> ephemeris = OrbitalEphemerisMessage.from_ascii_oem(file_path)

An OEM is made up of one or more data segments available through an iterator:

>>> for segment in ephemeris:
...     for state in segment:
...         # Iterate through states
...         pass
...     for covariance in segment.covariances:
...         # Iterate through covariances
...         pass

It is also possible to iterate through the states and covariances in all segments with the .states and .covariances properties.

To determine if a particular epoch is contained in the useable time range of any of the segments in an ephemeris, use in:

>>> epoch in ephemeris
True
oem.OrbitalEphemerisMessage.covariances

Return a list of covariances in all segments.

oem.OrbitalEphemerisMessage.states

Return a list of states in all segments.

Ephemeris Components

See also

Module OrbitalEphemerisMessage

Module OEM Data Types

EphemerisSegment

class oem.components.EphemerisSegment(metadata, state_data, covariance_data=None, version='2.0')

Bases: object

OEM ephemeris segment.

Container for a single OEM ephemeris segment.

covariances

Return list of Covariances in this segment.

classmethod from_strings(components, version='2.0')

Create EphemerisSegment from OEM segment strings.

Parameters:components (tuple) – Tuple of OEM-formatted strings containing metadata, ephemeris data, and an optional covariance section.
Returns:New EphemerisSegment instance.
Return type:new_section (EphemerisSegment)
has_accel

Evaluate if segment contains acceleration data.

has_covariance

Evaluate if segment contains covariance data.

states

Return list of States in this segment.

useable_start_time

Return epoch of start of useable state data range

useable_stop_time

Return epoch of end of useable state data range

HeaderSection

class oem.components.HeaderSection(fields)

Bases: oem.base.KeyValueSection

OEM header section.

Container for a single OEM header section.

Examples

This class behaves similar to a dict allowing membership checks, iteration over keys, and value set/get.

>>> "CCSDS_OEM_VERS" in header:
True
>>> keys = [key for key in header]
>>> metadata["ORIGINATOR"] = 'ORIG_NAME'
>>> metadata["ORIGINATOR"]
'ORIG_NAME'
classmethod from_string(segment)

Create Header Section from OEM-formatted string.

Parameters:segment (str) – String containing a single OEM header section.
Returns:New HeaderSection instance.
Return type:new_section (HeaderSection)
version

MetaDataSection

class oem.components.MetaDataSection(metadata, version='2.0')

Bases: oem.base.KeyValueSection

OEM metadata section.

Container for a single OEM metadata section.

Examples

This class behaves similar to a dict allowing membership checks, iteration over keys, and value set/get.

>>> "OBJECT_NAME" in metadata:
True
>>> keys = [key for key in metadata]
>>> metadata["CENTER_NAME"] = 'Mars'
>>> metadata["CENTER_NAME"]
'Mars'
classmethod from_string(segment, version)

Create MetaDataSection from OEM-formatted string.

Parameters:segment (str) – String containing a single OEM metadata section.
Returns:New MetaDataSection instance.
Return type:new_section (MetaDataSection)
useable_start_time

Return epoch of start of useable state data range

useable_stop_time

Return epoch of end of useable state data range

DataSection

class oem.components.DataSection(states, version='2.0')

Bases: object

OEM data section.

Container for a single OEM ephemeris state data section.

classmethod from_string(segment, version)

Create DataSection from OEM-formatted string.

Parameters:segment (str) – String containing a single OEM data section.
Returns:New DataSection instance.
Return type:new_section (DataSection)
has_accel

Evaluate if section contains acceleration data.

states

Return a list of States in this section.

CovarianceSection

class oem.components.CovarianceSection(covariances, version='2.0')

Bases: object

OEM covariance section.

Container for a single OEM covariance section.

covariances

Return a list of covariances in this section.

classmethod from_string(segment, version)

Create CovarianceSection from OEM-formatted string.

Parameters:segment (str) – String containing a single OEM covariance section.
Returns:New CovarianceSection instance.
Return type:new_section (CovarianceSection)

OEM Data Types

State

class oem.components.State(epoch, position, velocity, acceleration=None, version='2.0')

Bases: object

Basic Cartesian state.

epoch

Epoch date and time.

Type:DateTime
position

3-element array describing the position at epoch.

Type:ndarray
velocity

3-element array describing the velocity at epoch.

Type:ndarray
acceleration

3-element array describing the acceleration at epoch. If unavailable, this attribute is None.

Type:ndarray
classmethod from_string(segment, version)

Create State from OEM-formatted string.

Parameters:segment (str) – String containing a single OEM state line.
Returns:New State instance.
Return type:new_state (State)

Covariance

class oem.components.Covariance(epoch, frame, matrix, version='2.0')

Bases: object

Basic 6x6 covariance.

epoch

Epoch date and time.

Type:DateTime
frame

Reference from of this covariance.

Type:str
matrix

6x6 covariance matrix.

Type:ndarray
classmethod from_string(segment, version)

Create Covariance from OEM-formatted string.

Parameters:segment (str) – String containing a single OEM covariance block.
Returns:New Covariance instance.
Return type:new_covariance (Covariance)

Indices and tables