data

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

This module provides with 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.

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.

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.

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.

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

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:
  • 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, matrix_columns: int, 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]