Orbit Ephemeris Message¶
The primary interface between the oem package and OEM files is the OrbitEphemerisMessage class. In addition, the package provides objects to represent each component of an OEM ephemeris.
OrbitEphemerisMessage¶
Python representation of an Orbit Ephemeris Message.
This class provides the primary interface between the OEM module and an OEM file.
-
oem.OrbitEphemerisMessage.
header
¶ Object containing the OEM header section.
Type: HeaderSection
Examples
The OrbitEphemerisMessage class can load directly from a file:
>>> ephemeris = OrbitEphemerisMessage.open(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
The save_as method enables saving of copies of an OEM in both KVN and XML formats.
>>> oem.save_as("new.oem", file_format="xml")
To convert directly between KVN and XML formats, use the convert class method. For example, to convert a KVN OEM to XML:
>>> oem.convert("input.oem", "output.oem", "xml")
-
oem.OrbitEphemerisMessage.
covariances
¶ Return a list of covariances in all segments.
-
oem.OrbitEphemerisMessage.
states
¶ Return a list of states in all segments.
Ephemeris Components¶
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.
-
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'
-
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'
-
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¶
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
-
has_accel
¶
-