Observation Collection Creation#

An ObservationCollection can be created by simulating observations or by loading them from external files. It’s also possible to manually create an ObservationCollection from a list of SingleObservationSet objects or to create a new collection after filtering or splitting an existing one.

This section covers the different readily-available methods for creating observation collections in Tudat:

The following pages provide detailed information on each method.

Manual Creation of Observation Collections#

In addition to loading observations from pre-defined file types (such as ODF or IFMS files), or simulating observations within the Tudat environment, users can manually create an ObservationCollection from arbitrary data sources, such as experimental measurements or pre-processed Python arrays. This allows the use of Tudat’s estimation and plotting utilities on user-provided datasets.

Defining Single Observation Sets#

The building block of an observation collection is the SingleObservationSet. This object encapsulates the data for a specific observable type associated with a specific link definition.

To create a single observation set, you must define the link ends, provide the observation times and values, and specify the reference link end. The observation collection is then created by passing a list of single observation sets to the ObservationCollection constructor.

import numpy as np
from tudatpy.estimation import observations
from tudatpy.estimation.observable_models_setup import links, model_settings

# 1. Define the link ends
link_ends = {
    links.LinkEndType.transmitter: links.body_origin_link_end_id("Starship"),
    links.LinkEndType.receiver: links.body_reference_point_link_end_id(
        "Earth", "Goldstone"
    ),
}

# 2. Prepare the data (times in seconds since J2000, observations in SI units)
times = np.array([1.0e7, 1.0e7 + 300, 1.0e7 + 600])

# Angular observations (RA/Dec) must be provided in radians
obs_values = np.array(
    [
        [np.deg2rad(120.0), np.deg2rad(10.0)],
        [np.deg2rad(120.2), np.deg2rad(10.1)],
        [np.deg2rad(120.4), np.deg2rad(10.2)],
    ]
)

# 3. Create the single observation set
angular_set = observations.create_single_observation_set(
    model_settings.ObservableType.angular_position_type,
    link_ends,
    obs_values,
    times,
    reference_link_end=links.LinkEndType.receiver,
)

# 4. Create the observation collection
observation_collection = observations.ObservationCollection([angular_set])

Note

When creating a manual observation collection, you must adhere to TudatPy’s default (SI) units: meters for distance, radians for angles, and seconds for time.