data¶

Interfacing of Tudat(py) to and from other applications.

This module provides different functionalities that allow to export results from Tudat(py) to other softwares such as MATLAB, to post-process results. A set of methods are also provided to read inputs from other softwares and integrate them with Tudat(py).

Functions¶

save2txt(solution, filename[, directory])

Save a vector or matrix history to a file.

save_time_history_to_file(solution, filename)

Save a propagated time history to a file.

read_vector_history_from_file(vector_size, ...)

Read a vector history from a file.

read_matrix_history_from_file(matrix_rows, ...)

Read a matrix history from a file.

get_resource_path()

Get the path at which tudat resources are located.

get_ephemeris_path()

Get the path at which the ephemeris used by tudat are located.

get_earth_orientation_path()

Get the path at which the Earth orientation resources used by tudat are located.

get_quadrature_path()

Get the path at which the Gaussian quadrature resources are located.

get_spice_kernel_path()

Get the path at which the SPICE kernel used by tudat is located.

get_atmosphere_tables_path()

Get the path at which tudat atmosphere tables are located.

get_gravity_models_path()

Get the path at which tudat gravity models are located.

get_space_weather_path()

Get the path at which tudat space weather is located.

grail_antenna_file_reader(file_name)

No documentation available.

grail_mass_level_0_file_reader(file_name)

No documentation available.

grail_mass_level_1_file_reader(file_name[, ...])

No documentation available.

read_fdets_file(file_name[, column_types])

Load contents of Fdets file into object

read_ifms_file(file_name[, ...])

Load contents of IFMS file into object

read_odf_file(file_name)

No documentation available.

read_solar_activity_data(file_path)

Reads a space weather data file and produces a dictionary with solar activity data for a range of epochs.

set_dsn_weather_data_in_ground_stations(...)

No documentation available.

set_estrack_weather_data_in_ground_stations(...)

No documentation available.

save2txt(solution, filename, directory='./')[source]¶

Save a vector or matrix history to a file.

This function can be used to save a dictionary that maps epochs to a vector or matrix at the given epoch.

Parameters:
  • solution (Dict[float, numpy.ndarray]) – Dictionary mapping floats (e.g. the simulation time steps) to arrays (e.g. the propagated state time series).

  • filename (str) – Name of the text file that is to be saved.

  • directory (str, optional, default="./") – Directory in which to save the text file.

save_time_history_to_file(solution, filename, directory='./')[source]¶

Save a propagated time history to a file.

This function can be used to save a propagated state history to a text file. It can also be used for instance to save a dependent variable history, or a sensitivity matrix history.

Note

This function is essentially the same method as save2txt(), offering the same functionality under a different name.

Parameters:
  • solution (Dict[float, numpy.ndarray]) – Dictionary mapping the simulation time steps to the propagated state time series.

  • filename (str) – Name of the text file that is to be saved.

  • directory (str, optional, default="./") – Directory in which to save the text file.

read_vector_history_from_file(vector_size: int | SupportsIndex, file_name: str) dict[float, numpy.ndarray[numpy.float64[m, 1]]]¶

Read a vector history from a file.

Parameters:
  • vector_size (int) – Size of the vector at each epoch.

  • file_name (str) – Name of the file containing the vector history.

Returns:

Dictionary mapping epochs to the vector at the given epoch.

Return type:

Dict[float, numpy.ndarray]

read_matrix_history_from_file(matrix_rows: int | SupportsIndex, matrix_columns: int | SupportsIndex, file_name: str) dict[float, numpy.ndarray[numpy.float64[m, n]]]¶

Read a matrix history from a file.

Parameters:
  • matrix_rows (int) – Number of rows in the matrix at each epoch.

  • matrix_columns (int) – Number of columns in the matrix at each epoch.

  • file_name (str) – Name of the file containing the matrix history.

Returns:

Dictionary mapping epochs to the matrix at the given epoch.

Return type:

Dict[float, numpy.ndarray]

get_resource_path() str¶

Get the path at which tudat resources are located.

Returns:

Local path at which tudat resources are located.

Return type:

str

get_ephemeris_path() str¶

Get the path at which the ephemeris used by tudat are located.

Returns:

Local path at which the tudat ephemeris resources are located.

Return type:

str

get_earth_orientation_path() str¶

Get the path at which the Earth orientation resources used by tudat are located.

Returns:

Local path at which tudat Earth orientation resources are located.

Return type:

str

get_quadrature_path() str¶

Get the path at which the Gaussian quadrature resources are located.

Returns:

Local path at which tudat Gaussian quadrature resources are located.

Return type:

str

get_spice_kernel_path() str¶

Get the path at which the SPICE kernel used by tudat is located.

Returns:

Local path at which the SPICE kernel is located.

Return type:

str

get_atmosphere_tables_path() str¶

Get the path at which tudat atmosphere tables are located.

Returns:

Local path at which tudat atmosphere tables are located.

Return type:

str

get_gravity_models_path() str¶

Get the path at which tudat gravity models are located.

Returns:

Local path at which tudat gravity models are located.

Return type:

str

get_space_weather_path() str¶

Get the path at which tudat space weather is located.

Returns:

Local path at which tudat space weather is located.

Return type:

str

grail_antenna_file_reader(file_name: str) tuple[list[float], list[float]]¶

No documentation available.

grail_mass_level_0_file_reader(file_name: str) dict[float, float]¶

No documentation available.

grail_mass_level_1_file_reader(file_name: str, data_level: str = '1b') dict[float, float]¶

No documentation available.

read_fdets_file(file_name: str, column_types: list[str] = ['utc_datetime_string', 'signal_to_noise_ratio', 'normalised_spectral_max', 'doppler_measured_frequency_hz', 'doppler_noise_hz']) tudatpy.kernel.data.TrackingTxtFileContents¶

Load contents of Fdets file into object

This function loads the contents of an Fdets file into a dictionary with keys defined by the strings listed in column_types. If a list of columns is not specified, the following structure is assumed:

  • UTC datetime string

  • Signal to noise ratio [-]

  • Normalized spectral max (Not sure what this is)

  • Doppler measured frequency [Hz]

  • Doppler noise [Hz]

param file_name:

String representing the path to the file to be loaded

param column_types:

Identifiers of the columns present in the Fdets file

return fdets_contents:

Dictionary with contents of the Fdets file as lists of strings

read_ifms_file(file_name: str, apply_tropospheric_correction: bool = True, remove_invalid_lines: bool = True) tudatpy.kernel.data.TrackingTxtFileContents¶

Load contents of IFMS file into object

The keys of the dictionary represent the different columns of the IFMS file, and their values are lists with all the values in the associated column as strings.

Two of the columns of an IFMS file contain, respectively, the Doppler averaged frequency and a tropospheric correction for the station. When the apply_tropospheric_correction option is set to true, the content of the first column is modified by subtracting the values in the second.

param file_name:

String representing the path to the file to be loaded

param apply_tropospheric_correction:

Whether to modify the averaged Doppler frequency as described above (Default: True)

param remove_invalid_lines:

Boolean defining whether a line is skipped if the transmit frequency, observed frequency, or troposphere correction is undefined (Default: True)

return ifms_contents:

Dictionary with contents of the IFMS file as lists of strings

read_odf_file(file_name: str) tudatpy.kernel.data.OdfRawFileContents¶

No documentation available.

read_solar_activity_data(file_path: str) dict[float, tudatpy.kernel.data.SolarActivityData]¶

Reads a space weather data file and produces a dictionary with solar activity data for a range of epochs. Data files can be obtained from http://celestrak.com/SpaceData and should follow the legacy format.

Parameters:

file_path – Path to the space weather data file.

set_dsn_weather_data_in_ground_stations(bodies: tudat::simulation_setup::SystemOfBodies, weather_file_names: list[str], interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = <tudatpy.kernel.math.interpolators.InterpolatorSettings object at 0x7fa5cc44f6b0>, ground_stations_per_complex: dict[int | typing.SupportsIndex, list[str]] = {10: ['DSS-13', 'DSS-14', 'DSS-15', 'DSS-24', 'DSS-25', 'DSS-26', 'DSS-27'], 40: ['DSS-34', 'DSS-35', 'DSS-36', 'DSS-43', 'DSS-45'], 60: ['DSS-53', 'DSS-54', 'DSS-55', 'DSS-56', 'DSS-63', 'DSS-65']}, body_with_ground_stations_name: str = 'Earth') None¶

No documentation available.

set_estrack_weather_data_in_ground_stations(bodies: tudat::simulation_setup::SystemOfBodies, weather_file_names: list[str], ground_station_name: str, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = <tudatpy.kernel.math.interpolators.InterpolatorSettings object at 0x7fa5cc454270>, body_with_ground_stations_name: str = 'Earth') None¶

No documentation available.