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).
Modules
Functions¶
|
Save a vector or matrix history to a file. |
|
Save a propagated time history to a file. |
|
Read a vector history from a file. |
|
Read a matrix history from a file. |
Get the path at which tudat resources are located. |
|
Get the path at which the ephemeris used by tudat are located. |
|
Get the path at which the Earth orientation resources used by tudat are located. |
|
Get the path at which the Gaussian quadrature resources are located. |
|
Get the path at which the SPICE kernel used by tudat is located. |
|
Get the path at which tudat atmosphere tables are located. |
|
Get the path at which tudat gravity models are located. |
|
Get the path at which tudat space weather is located. |
|
|
No documentation available. |
|
No documentation available. |
|
No documentation available. |
|
Overloaded function. |
|
Load contents of IFMS file into object |
|
No documentation available. |
|
Reads a space weather data file and produces a dictionary with solar activity data for a range of epochs. |
Set DSN weather data in the requested ground stations. |
|
Set ESTRACK weather data in a ground station. |
- 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, file_name: str) dict[float, numpy.ndarray[numpy.float64[m, 1]]]¶
Read a vector history from a file.
- Parameters:
- 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, matrix_columns: int, file_name: str) dict[float, numpy.ndarray[numpy.float64[m, n]]]¶
Read a matrix history from a file.
- Parameters:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- grail_antenna_file_reader(file_name: str) tuple[list[float], list[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(*args, **kwargs)¶
Overloaded function.
Overload 1:
read_fdets_file(file_name: str, date_format: tudatpy.kernel.data.FdetDateFormat = <FdetDateFormat.datetime_string: 0>) -> tudatpy.kernel.data.TrackingTxtFileContentsLoad contents of Fdets file into object
This function loads the contents of an Fdets file. For the currently supported datetime_string date format, 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]
If the file contains an additional leading scan-number column, this column is detected automatically.
- Parameters:
file_name (str) – String representing the path to the file to be loaded
date_format (FdetDateFormat) – Date format used in the Fdets file
- Returns:
fdets_contents – Dictionary with contents of the Fdets file as lists of strings
- Return type:
TrackingTxtFileContents
Overload 2:
read_fdets_file(file_name: str, column_types: list[str]) -> tudatpy.kernel.data.TrackingTxtFileContentsLoad contents of Fdets file into object using explicit column identifiers.
Deprecated since version Passing: explicit column identifiers is deprecated. Use the date_format argument instead.
- 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.
- Parameters:
file_name (str) – String representing the path to the file to be loaded
apply_tropospheric_correction (bool) – Whether to modify the averaged Doppler frequency as described above (Default: True)
remove_invalid_lines (bool) – Boolean defining whether a line is skipped if the transmit frequency, observed frequency, or troposphere correction is undefined (Default: True)
- Returns:
ifms_contents – Dictionary with contents of the IFMS file as lists of strings
- Return type:
TrackingTxtFileContents
- 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 (str) – Path to the space weather data file.
- set_dsn_weather_data_in_ground_stations(bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, weather_file_names: list[str], interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = ..., ground_stations_per_complex: dict[int, list[str]] = tudatpy.dynamics.environment_setup.ground_station.get_default_dsn_station_names_per_complex(), body_with_ground_stations_name: str = 'Earth') None¶
Set DSN weather data in the requested ground stations.
- Parameters:
bodies (dynamics.environment.SystemOfBodies) – Bodies containing the ground stations to update.
weather_file_names (list[str]) – DSN weather data files to read.
interpolator_settings (math.interpolators.InterpolatorSettings, default = math.interpolators.linear_interpolation()) – Settings used to interpolate the weather data.
ground_stations_per_complex (dict[int, list[str]], default = dynamics.environment_setup.ground_station.get_default_dsn_station_names_per_complex()) – Ground-station names grouped by DSN complex.
body_with_ground_stations_name (str, default = "Earth") – Name of the body containing the ground stations.
- set_estrack_weather_data_in_ground_stations(bodies: tudatpy.kernel.dynamics.environment.SystemOfBodies, weather_file_names: list[str], ground_station_name: str, interpolator_settings: tudatpy.kernel.math.interpolators.InterpolatorSettings = ..., body_with_ground_stations_name: str = 'Earth') None¶
Set ESTRACK weather data in a ground station.
- Parameters:
bodies (dynamics.environment.SystemOfBodies) – Bodies containing the ground station to update.
weather_file_names (list[str]) – ESTRACK weather data files to read.
ground_station_name (str) – Name of the ground station to update.
interpolator_settings (math.interpolators.InterpolatorSettings, default = math.interpolators.cubic_spline_interpolation()) – Settings used to interpolate the weather data.
body_with_ground_stations_name (str, default = "Earth") – Name of the body containing the ground station.