generic_text_file

Generic text tracking-data loading.

This submodule contains functionality to load tracking data from generic text files with user-defined tracking-data columns. The read_generic_text_data() function is the main interface for loading the data and converting it to parsed tracking text-file contents that Tudat can process further; see also tracking_data. All other functionality in this module is reserved for better understanding what data is being loaded, and in some cases manipulating it, before it is processed into Tudat-compatible objects.

read_generic_text_data(file_names: list[str], column_types: list[str], comment_symbol: str = '#', value_separators: str = ',:\t ', ignore_omitted_columns: bool = False, data_filter_method: tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingTxtFileReadFilterType = <TrackingTxtFileReadFilterType.no_tracking_txt_file_filter: 0>) → list[tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingTxtFileContents]

Read generic tracking text files.

Each file is interpreted as rows of tracking measurements with data types defined by the column_types argument. The resulting TrackingTxtFileContents objects can be inspected before converting the data to Tudat-compatible tracking-data objects. The TrackingTxtFileContents class stores the parsed numeric and raw string columns, together with any metadata added before later processing.

Parameters:
  • file_names (list[str]) – Paths to the tracking text files.

  • column_types (list[str]) – Names of the data fields represented by each column.

  • comment_symbol (str, default="#") – Character used to mark comment lines.

  • value_separators (str, default=",:t ") – Characters interpreted as value separators.

  • ignore_omitted_columns (bool, default=False) – Whether columns omitted from column_types are ignored.

  • data_filter_method (TrackingTxtFileReadFilterType, default=no_tracking_txt_file_filter) – Optional reader-specific filter mode.

Returns:

Parsed tracking text-file contents, one object per input file.

Return type:

list[TrackingTxtFileContents]

Supporting API

The classes below define the parsed generic text-file contents and the column or filter identifiers used while reading these files. They can be used to inspect the loaded columns and metadata before any later conversion step.

class TrackingTxtFileContents

Bases: pybind11_object

Container for parsed generic tracking text-file contents.

This class is a supporting interface for inspecting parsed file contents. In the typical Tudat workflow for this submodule, call read_generic_text_data() instead.

Parameters:
  • file_name (str) – Path to the tracking text file.

  • column_types (list[str]) – Names of the data fields represented by each column.

  • comment_symbol (str, default="#") – Character used to mark comment lines.

  • value_separators (str, default=",:t ") – Characters interpreted as value separators.

add_metadata_str(self: tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingTxtFileContents, tracking_data_type: tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingDataType, str_value: str) → None

Add a string metadata value to the parsed file contents.

Parameters:
  • tracking_data_type (TrackingDataType) – Metadata field to set.

  • str_value (str) – Metadata value.

Return type:

None

add_metadata_val(self: tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingTxtFileContents, tracking_data_type: tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingDataType, value: float) → None

Add a scalar metadata value to the parsed file contents.

Parameters:
Return type:

None

get_available_datatypes(self: tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingTxtFileContents) → list[tudatpy.kernel.data_input.tracking_data.generic_text_file.TrackingDataType]

Return all data fields available in the parsed contents.

Returns:

Data fields for which data or metadata is available.

Return type:

list[TrackingDataType]

property column_field_types

read-only

Data field assigned to each input column.

Type:

list[TrackingDataType]

property double_datamap

read-only

Numeric parsed data by field.

Type:

dict[TrackingDataType, list[float]]

property num_rows

read-only

Number of parsed data rows.

Type:

int

property raw_datamap

read-only

Raw string parsed data by field.

Type:

dict[TrackingDataType, list[str]]

class TrackingDataType

Bases: pybind11_object

Recognized data fields in generic tracking text files.

Members:

year : Generic tracking text-file data field.

month : Generic tracking text-file data field.

day : Generic tracking text-file data field.

hour : Generic tracking text-file data field.

minute : Generic tracking text-file data field.

second : Generic tracking text-file data field.

observation_time_scale : Generic tracking text-file data field.

file_name : Generic tracking text-file data field.

n_way_light_time : Generic tracking text-file data field.

light_time_measurement_delay : Generic tracking text-file data field.

light_time_measurement_accuracy : Generic tracking text-file data field.

dsn_transmitting_station_nr : Generic tracking text-file data field.

dsn_receiving_station_nr : Generic tracking text-file data field.

observation_body : Generic tracking text-file data field.

observed_body : Generic tracking text-file data field.

spacecraft_id : Generic tracking text-file data field.

spacecraft_name : Generic tracking text-file data field.

planet_nr : Generic tracking text-file data field.

tdb_reception_time_j2000 : Generic tracking text-file data field.

utc_reception_time_j2000 : Generic tracking text-file data field.

utc_ramp_referencee_j2000 : Generic tracking text-file data field.

tdb_spacecraft_j2000 : Generic tracking text-file data field.

x_planet_frame : Generic tracking text-file data field.

y_planet_frame : Generic tracking text-file data field.

z_planet_frame : Generic tracking text-file data field.

vx_planet_frame : Generic tracking text-file data field.

vy_planet_frame : Generic tracking text-file data field.

vz_planet_frame : Generic tracking text-file data field.

residual_de405 : Generic tracking text-file data field.

spacecraft_transponder_delay : Generic tracking text-file data field.

uplink_frequency : Generic tracking text-file data field.

downlink_frequency : Generic tracking text-file data field.

signal_to_noise : Generic tracking text-file data field.

spectral_max : Generic tracking text-file data field.

doppler_measured_frequency : Generic tracking text-file data field.

doppler_averaged_frequency : Generic tracking text-file data field.

doppler_integration_time : Generic tracking text-file data field.

doppler_base_frequency : Generic tracking text-file data field.

doppler_noise : Generic tracking text-file data field.

doppler_bandwidth : Generic tracking text-file data field.

receiving_station_name : Generic tracking text-file data field.

transmitting_station_name : Generic tracking text-file data field.

time_tag_delay

sample_number

utc_day_of_year

reference_body_distance

transmission_frequency_constant_term

transmission_frequency_linear_term

doppler_predicted_frequency_hz

doppler_troposphere_correction

scan_nr

class TrackingTxtFileReadFilterType

Bases: pybind11_object

Filter mode used when reading generic tracking text files.

Members:

no_tracking_txt_file_filter

ifms_tracking_txt_file_filter