observations_wrapper¶
The functionality in this module is used to either load or simulate observations, typically for later use in an orbit estimation. The functionality here is for loading/simulating data using Tudat-native functionality. We also provide functionality to load data from various sources using external packages/libraries (see the data module, including for TNF files from the DSN, and for astrometric data from the MPC). More information on using real data for an estimation in Tudat is given on the user guide
This module supports the loading of the following data types:
ODF files: Data files produced by NASA Deep Space Network (DSN) according to the TRK 2-18 format. ODF files are binary files, which can be read by Tudat using the
process_odf_data_multiple_files()and converted into anObservationCollectionusing thecreate_odf_observed_observation_collection()function. The ODF files also contain information on station transmission frequencies (ramp tables) which can be automatically set in the ground station objects in Tudat from the data in the ODF files using theset_odf_information_in_bodies()function. As a function of convenience, theobservations_from_odf_files()takes care of each of these steps. At the moment, only two- and three-way Doppler data, and two-way sequential ranging data are supported in the file reading of ODF filesIFMS files: Data files produced by ESA’s ESTRACK tracking network, see generic documentation and mission-specific documentation. IFMS files are text files containing the radio tracking data and station transmission frequencies. The
observations_from_ifms_files()function is used to load an IFMS file, store the relevant data in anObservationCollection, and update the transmitting station’s transmission frequencies.Fdets files: Data files containing open-loop Doppler data produced using the Planetary Radio Interferometry and Doppler Experiment (PRIDE), see data processing description . These data files contain frequency observations, typically from a spacecraft downlink that is retransmitted from an uplink. The Fdets files only contain the frequency detections. To use these data in an orbit estimation, the transmitter frequency needs to be defined, or loaded from another data source (such as ODF or IFMS files).
We also provide a generic interface for loading simple text files with data (see create_tracking_txtfile_observation_collection()) and for creating ‘pseudo-observations’ (Cartesian position observations from existing ephemerides, see create_pseudo_observations_and_models()). Finally, the simulate_observations() function can be used to simulate observations inside Tudat.
In each of the above cases, the functionality in this module creates an ObservationCollection object, which can then be used as input to perform an estimation (see estimation_analysis module).
Functions¶
|
Process a single ODF file. |
|
Process multiple ODF files. |
Sets the ODF information required for simulating observations into the system of bodies. |
|
Creates an observation collection containing the provided ODF data. |
|
|
Create an observation collection from ODF files. |
|
Create an observation collection from IFMS files for a single station. |
Create an observation collection from IFMS files for multiple stations. |
|
|
Create an observation collection from an FDETS file. |
|
Create a compressed Doppler observation collection. |
Create an observation collection from raw tracking file data. |
|
No documentation found. |
|
|
|
|
Function to simulate observations. |
|
No documentation found. |
|
No documentation found. |
- process_odf_data_single_file(file_name: str, spacecraft_name: str, verbose: bool = True, earth_fixed_ground_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]] = tudatpy.dynamics.environment_setup.ground_station.get_approximate_dsn_ground_station_positions()) tudatpy.kernel.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents¶
Process a single ODF file.
- Parameters:
file_name (str) – ODF file name.
spacecraft_name (str) – Name of the spacecraft.
verbose (bool, optional) – Whether to print warnings, by default True.
earth_fixed_ground_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions of DSN ground stations (as given by
get_approximate_dsn_ground_station_positions()) will be used.
- Returns:
Processed ODF file contents.
- Return type:
tudatpy.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents
- process_odf_data_multiple_files(file_names: list[str], spacecraft_name: str, verbose: bool = True, earth_fixed_ground_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]] = tudatpy.dynamics.environment_setup.ground_station.get_approximate_dsn_ground_station_positions()) tudatpy.kernel.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents¶
Process multiple ODF files.
- Parameters:
spacecraft_name (str) – Name of the spacecraft.
verbose (bool, optional) – Whether to print warnings, by default True.
earth_fixed_ground_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions of DSN ground stations (as given by
get_approximate_dsn_ground_station_positions()) will be used.
- Returns:
Processed ODF file contents.
- Return type:
tudatpy.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents
- set_odf_information_in_bodies(processed_odf_file: tudatpy.kernel.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents, bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, body_with_ground_stations_name: str = 'Earth', turnaround_ratio_function: Callable[[tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands], float] = <built-in method of pybind11_builtins.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_1 object at 0x7fa5cc533250>) None¶
Sets the ODF information required for simulating observations into the system of bodies.
This includes: - Setting the transmitting frequencies objects in the ground stations - Setting the turnaround ratio in the spacecraft
- Parameters:
processed_odf_file (tudatpy.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents) – Processed ODF file contents.
bodies (tudatpy.dynamics.environment.SystemOfBodies) – System of bodies.
body_with_ground_stations_name (str, optional) – Name of the body in which the ground stations are located, by default “Earth”.
turnaround_ratio_function (function, optional) – Function returning the turnaround ratio as a function of the uplink and downlink bands.
- create_odf_observed_observation_collection(processed_odf_file: tudatpy.kernel.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents, observable_types_to_process: list[tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservableType], start_and_end_times_to_process: tuple[tudatpy.kernel.astro.time_representation.Time, tudatpy.kernel.astro.time_representation.Time], allow_duplicate_observations_within_single_set: bool = True) tudatpy.kernel.estimation.observations.ObservationCollection¶
Creates an observation collection containing the provided ODF data.
Only the specified observable types are loaded from the processed ODF data into the observation collection.
- Parameters:
processed_odf_file (tudatpy.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents) – Processed ODF data.
observable_types_to_process (list[tudatpy.estimation.observable_models_setup.model_settings.ObservableType]) – Observable types to process.
start_and_end_times_to_process (tuple[float, float]) – Start and end times of the data to process.
allow_duplicate_observations_within_single_set (bool) – Determines if duplicate observations should be erased on SingleObservationSet level before ObservationCollection creation, default is True.
- Returns:
Observation collection.
- Return type:
- observations_from_odf_files(bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, odf_file_names: list[str], target_name: str, verbose_output: bool = True, earth_fixed_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]] = tudatpy.dynamics.environment_setup.ground_station.get_approximate_dsn_ground_station_positions(), allow_duplicate_observations_within_single_set: bool = True) tudatpy.kernel.estimation.observations.ObservationCollection¶
Create an observation collection from ODF files.
This function processes ODF files, sets the required information in the bodies, and creates an observation collection.
- Parameters:
bodies (tudatpy.dynamics.environment.SystemOfBodies) – System of bodies.
target_name (str) – Name of the target spacecraft.
verbose_output (bool, optional) – Whether to print verbose output during processing, by default True.
earth_fixed_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions of DSN ground stations (as given by
get_approximate_dsn_ground_station_positions()) will be used.allow_duplicate_observations_within_single_set (bool) – Determines if duplicate observations should be erased on SingleObservationSet level before ObservationCollection creation, default is True.
- Returns:
Observation collection.
- Return type:
- observations_from_ifms_files(ifms_file_names: list[str], bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, target_name: str, ground_station_name: str, reception_band: tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, transmission_band: tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, apply_troposphere_correction: bool = True, earth_fixed_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]] = tudatpy.dynamics.environment_setup.ground_station.get_radio_telescope_positions(), remove_invalid_lines: bool = True) tudatpy.kernel.estimation.observations.ObservationCollection¶
Create an observation collection from IFMS files for a single station.
This function processes IFMS files, sets the required information in the bodies, and creates an observation collection.
- Parameters:
bodies (tudatpy.dynamics.environment.SystemOfBodies) – System of bodies.
target_name (str) – Name of the target spacecraft.
ground_station_name (str) – Name of the ground station.
reception_band (tudatpy.estimation.observations_setup.ancillary_settings.FrequencyBands) – Reception frequency band.
transmission_band (tudatpy.estimation.observations_setup.ancillary_settings.FrequencyBands) – Transmission frequency band.
apply_troposphere_correction (bool, optional) – Whether to apply troposphere correction, by default True.
earth_fixed_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions as given by
get_radio_telescope_positions()will be used.remove_invalid_lines (bool, optional) – Boolean (default true) defining whether a line is skipped if the transmit frequency, observed frequency, or troposphere correction is undefined
- Returns:
Observation collection.
- Return type:
- observations_from_multi_station_ifms_files(ifms_file_names: list[str], bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, target_name: str, ground_station_names: list[str], reception_band: tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, transmission_band: tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, apply_troposphere_correction: bool = True, earth_fixed_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]] = tudatpy.dynamics.environment_setup.ground_station.get_radio_telescope_positions(), remove_invalid_lines: bool = True) tudatpy.kernel.estimation.observations.ObservationCollection¶
Create an observation collection from IFMS files for multiple stations.
This function processes IFMS files, sets the required information in the bodies, and creates an observation collection.
- Parameters:
bodies (tudatpy.dynamics.environment.SystemOfBodies) – System of bodies.
target_name (str) – Name of the target spacecraft.
ground_station_names (list[str]) – List of ground station names, must be same size as ifms_file_names.
reception_band (tudatpy.estimation.observations_setup.ancillary_settings.FrequencyBands) – Reception frequency band.
transmission_band (tudatpy.estimation.observations_setup.ancillary_settings.FrequencyBands) – Transmission frequency band.
apply_troposphere_correction (bool, optional) – Whether to apply troposphere correction, by default True.
earth_fixed_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions as given by
get_radio_telescope_positions()will be used.remove_invalid_lines (bool, optional) – Boolean (default true) defining whether a line is skipped if the transmit frequency, observed frequency, or troposphere correction is undefined
- Returns:
Observation collection.
- Return type:
- observations_from_fdets_files(ifms_file_name: str, base_frequency: float | SupportsIndex, column_types: list[str], target_name: str, transmitting_station_name: str, receiving_station_name: str, reception_band: tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, transmission_band: tudatpy.kernel.estimation.observations_setup.ancillary_settings.FrequencyBands, earth_fixed_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]] = tudatpy.dynamics.environment_setup.ground_station.get_radio_telescope_positions()) tudatpy.kernel.estimation.observations.ObservationCollection¶
Create an observation collection from an FDETS file.
This function processes an FDETS file and creates an observation collection.
- Parameters:
ifms_file_name (str) – FDETS file name.
base_frequency (float) – Base frequency for Doppler observables.
column_types (list[str]) – List of column types in the FDETS file.
target_name (str) – Name of the target spacecraft.
transmitting_station_name (str) – Name of the transmitting station.
receiving_station_name (str) – Name of the receiving station.
reception_band (tudatpy.estimation.observations_setup.ancillary_settings.FrequencyBands) – Reception frequency band.
transmission_band (tudatpy.estimation.observations_setup.ancillary_settings.FrequencyBands) – Transmission frequency band.
earth_fixed_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions as given by
get_radio_telescope_positions()will be used.
- Returns:
Observation collection.
- Return type:
- create_compressed_doppler_collection(original_observation_collection: tudatpy.kernel.estimation.observations.ObservationCollection, compression_ratio: int | SupportsIndex, minimum_number_of_observations: int | SupportsIndex = 10, max_arc_gap: float | SupportsIndex = 300.0) tudatpy.kernel.estimation.observations.ObservationCollection¶
Create a compressed Doppler observation collection.
This function takes a collection of Doppler observations, splits them into arcs, and compresses each arc by averaging observations.
- Parameters:
original_observation_collection (tudatpy.estimation.observations.ObservationCollection) – The original observation collection containing Doppler data.
compression_ratio (int) – The number of observations to average into a single compressed observation.
minimum_number_of_observations (int, optional) – The minimum number of observations required in an arc to be considered for compression, by default 10.
max_arc_gap (float, optional) – Maximum time gap (in seconds) between consecutive observations before splitting into a new arc, by default 300.0.
- Returns:
A new observation collection with compressed Doppler data.
- Return type:
- create_tracking_txtfile_observation_collection(raw_tracking_txtfile_contents: tudatpy.kernel.data.TrackingTxtFileContents, spacecraft_name: str, observable_types_to_process: list[tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservableType] = [], earth_fixed_ground_station_positions: dict[str, numpy.ndarray[numpy.float64[3, 1]]]=tudatpy.dynamics.environment_setup.ground_station.get_approximate_dsn_ground_station_positions(), ancillary_settings: tudatpy.kernel.estimation.observations_setup.ancillary_settings.ObservationAncillarySimulationSettings = <tudatpy.kernel.estimation.observations_setup.ancillary_settings.ObservationAncillarySimulationSettings object at 0x7fa5cc37dfb0>) tudatpy.kernel.estimation.observations.ObservationCollection¶
Create an observation collection from raw tracking file data.
- Parameters:
raw_tracking_txtfile_contents (tudatpy.io.TrackingTxtFileContents) – The raw tracking file contents.
spacecraft_name (str) – Name of the spacecraft.
observable_types_to_process (list[tudatpy.estimation.observable_models_setup.model_settings.ObservableType], optional) – List of observable types to process. If empty, all available types are processed.
earth_fixed_ground_station_positions (dict[str, numpy.ndarray[3]], optional) – Map with approximate positions of ground stations in Earth-fixed frame. If none is provided, the approximate positions of DSN ground stations (as given by
get_approximate_dsn_ground_station_positions()) will be used.ancillary_settings (tudatpy.estimation.observations_setup.ancillary_settings.ObservationAncillarySimulationSettings, optional) – Ancillary settings for the observations.
- Returns:
Observation collection.
- Return type:
- create_pseudo_observations_and_models(bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, observed_bodies: list[str], central_bodies: list[str], initial_time: tudatpy.kernel.astro.time_representation.Time, final_time: tudatpy.kernel.astro.time_representation.Time, time_step: tudatpy.kernel.astro.time_representation.Time) tuple[list[tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservationModelSettings], tudatpy.kernel.estimation.observations.ObservationCollection]¶
No documentation found.
- set_existing_observations(observations: dict[tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservableType, tuple[dict[tudatpy.kernel.estimation.observable_models_setup.links.LinkEndType, tudatpy.kernel.estimation.observable_models_setup.links.LinkEndId], tuple[list[numpy.ndarray[numpy.float64[m, 1]]], list[tudatpy.kernel.astro.time_representation.Time]]]], reference_link_end: tudatpy.kernel.estimation.observable_models_setup.links.LinkEndType, ancillary_settings_per_observatble: dict[tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservableType, tudatpy.kernel.estimation.observations_setup.ancillary_settings.ObservationAncillarySimulationSettings] = {}) tudatpy.kernel.estimation.observations.ObservationCollection¶
- simulate_observations(simulation_settings: list[tudatpy.kernel.estimation.observations_setup.observations_simulation_settings.ObservationSimulationSettings], observation_simulators: list[tudatpy.kernel.estimation.observable_models.observables_simulation.ObservationSimulator], bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies) tudatpy.kernel.estimation.observations.ObservationCollection¶
Function to simulate observations.
Function to simulate observations from set observation simulators and observation simulator settings. Automatically iterates over all provided observation simulators, generating the full set of simulated observations.
- Parameters:
observation_to_simulate (List[
ObservationSimulationSettings]) – List of settings objects, each object providing the observation time settings for simulating one type of observable and link end set.observation_simulators (List[
ObservationSimulator]) – List ofObservationSimulatorobjects, each object hosting the functionality for simulating one type of observable and link end set.bodies (
SystemOfBodies) – Object consolidating all bodies and environment models, including ground station models, that constitute the physical environment.
- Returns:
Object collecting all products of the observation simulation.
- Return type:
- single_type_observation_collection(observable_type: tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservableType, link_ends: tudatpy.kernel.estimation.observable_models_setup.links.LinkDefinition, observations_list: list[numpy.ndarray[numpy.float64[m, 1]]], times_list: list[tudatpy.kernel.astro.time_representation.Time], reference_link_end: tudatpy.kernel.estimation.observable_models_setup.links.LinkEndType, ancillary_settings: tudatpy.kernel.estimation.observations_setup.ancillary_settings.ObservationAncillarySimulationSettings = None) tudatpy.kernel.estimation.observations.ObservationCollection¶
No documentation found.
- create_pseudo_observations_and_models_from_observation_times(bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, observed_bodies: list[str], central_bodies: list[str], observation_times: list[tudatpy.kernel.astro.time_representation.Time]) tuple[list[tudatpy.kernel.estimation.observable_models_setup.model_settings.ObservationModelSettings], tudatpy.kernel.estimation.observations.ObservationCollection]¶
No documentation found.
Classes¶
Class containing processed ODF data. |
- class ProcessedOdfFileContents¶
Bases:
pybind11_objectClass containing processed ODF data.
- define_antenna_id(self: tudatpy.kernel.estimation.observations_setup.observations_wrapper.ProcessedOdfFileContents, spacecraft_name: str, antenna_name: str) None¶
Define the antenna ID for a given spacecraft.
- property ground_station_names¶
Get the names of the ground stations included in the ODF files.
- property ignored_ground_stations¶
Return ground stations for which observations were not included in the processed data (due to absence of ramp tables).
- property ignored_odf_observable_types¶
Return ODF observable types IDs (as per TRK-2-18) that were not included in the processed data.
- Returns:
List of ignored ODF observable type IDs.
- Return type:
list[tudatpy.io.odf.OdfDataType]
- property processed_observable_types¶
Get the observable types in the ODF files.
- Returns:
List of observable types.
- Return type:
list[tudatpy.estimation.observable_models_setup.model_settings.ObservableType]