parameters¶

Functions¶

print_parameter_names(parameter_set)

Function for printing a list of estimatable parameter names.

print_parameter_names(parameter_set: tudatpy.kernel.dynamics.parameters.EstimatableParameterSet) None¶

Function for printing a list of estimatable parameter names.

Function that allows you to print a verbose list of all parameters that shall be estimated. Consider parameters are listed separately.

Parameters:

parameter_set (EstimatableParameterSet.) – Instance of EstimatableParameterSet class, consolidating all estimatable parameters and simulation models.

Returns:

Verbose List of all parameters that shall be estimated. Consider parameters are listed separately.

Return type:

List[]

Examples

import numpy as np
from tudatpy.interface import spice
from tudatpy.dynamics import environment_setup, propagation_setup, parameters_setup, parameters
from tudatpy
from tudatpy.astro.time_representation import DateTime

# Load SPICE kernels
spice.load_standard_kernels()

# Set simulation epochs
simulation_start_epoch = DateTime(2000, 1, 1).epoch()
simulation_end_epoch = DateTime(2000, 1, 4).epoch()

# Create bodies
bodies_to_create = ["Sun", "Earth"]
global_frame_origin = "Earth"
global_frame_orientation = "J2000"
body_settings = environment_setup.get_default_body_settings(
  bodies_to_create, global_frame_origin, global_frame_orientation)

# Create vehicle
body_settings.add_empty_settings("Delfi-C3")
body_settings.get("Delfi-C3").constant_mass = 2.2
bodies = environment_setup.create_system_of_bodies(body_settings)

# Define propagation settings
bodies_to_propagate = ["Delfi-C3"]
central_bodies = ["Earth"]
accelerations_settings_delfi_c3 = dict(
  Sun=[propagation_setup.acceleration.point_mass_gravity()],
  Earth=[propagation_setup.acceleration.spherical_harmonic_gravity(8, 8)]
)
acceleration_settings = {"Delfi-C3": accelerations_settings_delfi_c3}
acceleration_models = propagation_setup.create_acceleration_models(
  bodies, acceleration_settings, bodies_to_propagate, central_bodies)
initial_state = np.zeros(6)  # Use a real initial state if needed

# Integrator settings
integrator_settings = propagation_setup.integrator.runge_kutta_fixed_step(60.0,
                                                                               coefficient_set=propagation_setup.integrator.CoefficientSets.rkdp_87)

# Create propagator
termination_condition = propagation_setup.propagator.time_termination(simulation_end_epoch)
propagator_settings = propagation_setup.propagator.translational(
  central_bodies, acceleration_models, bodies_to_propagate, initial_state,
  simulation_start_epoch, integrator_settings, termination_condition)

# Define parameters to estimate
parameter_settings = parameters_setup.initial_states(propagator_settings, bodies)
parameter_settings.append(parameters_setup.gravitational_parameter("Earth"))
parameters_to_estimate = parameters_setup.create_parameter_set(parameter_settings, bodies)

# Print parameter names
print(parameters.print_parameter_names(parameters_to_estimate))

Classes¶

EstimatableParameter

Estimatable parameter exposed through an untemplated vector-valued interface.

EstimatableParameterSet

Class containing a consolidated set of estimatable parameters.

class EstimatableParameter¶

Bases: pybind11_object

Estimatable parameter exposed through an untemplated vector-valued interface.

get_parameter_value(self: tudatpy.kernel.dynamics.parameters.EstimatableParameter) numpy.ndarray[numpy.float64[m, 1]]¶

Get the parameter value through the untemplated interface.

Returns:

Current value of this parameter block.

Return type:

numpy.ndarray[numpy.float64[m, 1]]

set_parameter_value(self: tudatpy.kernel.dynamics.parameters.EstimatableParameter, parameter_value: numpy.ndarray[numpy.float64[m, 1]]) None¶

Set the parameter value through the untemplated interface.

Parameters:

parameter_value (numpy.ndarray[numpy.float64[m, 1]]) – New value for this parameter block.

property parameter_description¶

read-only

Human-readable parameter description.

Type:

str

property parameter_identifier¶

read-only

Full parameter identifier as (parameter_type, (associated_body, secondary_identifier)).

Type:

tuple[ EstimatableParameterTypes, tuple[str, str] ]

property parameter_size¶

read-only

Size of this parameter block in the estimation vector.

Type:

int

EstimatableParameter.get_parameter_value(self)

Get the parameter value through the untemplated interface.

EstimatableParameter.set_parameter_value(...)

Set the parameter value through the untemplated interface.

class EstimatableParameterSet¶

Bases: pybind11_object

Class containing a consolidated set of estimatable parameters.

Class containing a consolidated set of estimatable parameters, linked to the environment and acceleration settings of the simulation. The user typically creates instances of this class via the create_parameter_set() function.

get_parameter_descriptions(self: tudatpy.kernel.dynamics.parameters.EstimatableParameterSet) list[str]¶

Function to retrieve the descriptions of all parameters in the set.

Returns:

List of parameter descriptions formatted as strings.

Return type:

List[ str ]

get_parameter_identifiers(self: tudatpy.kernel.dynamics.parameters.EstimatableParameterSet) list[tuple[tudatpy.kernel.dynamics.parameters_setup.EstimatableParameterTypes, tuple[str, str]]]¶

Function to retrieve the identifiers of all parameters in the set.

Returns:

List of parameter identifiers. The first element of the tuple is the parameter type, the second element is a tuple containing the body name and, if applicable, a secondary identifier (e.g., station name), else this is an empty string.

Return type:

tuple[ EstimatableParameterTypes, tuple[str, str] ]

indices_for_parameter_description(self: tudatpy.kernel.dynamics.parameters.EstimatableParameterSet, parameter_description: str) tuple[int, int]¶

Function to retrieve the indices of a given type of parameter.

Function to retrieve the index of all parameters of a given type from the parameter set. This function can be very useful, since the order of parameters within the parameter set does not necessarily correspond to the order in which the elements were added to the set.

Parameters:

parameter_description (str) – Parameter description that is to be searched in full list of parameters. Parameter descriptions can be retrieved from the tudatpy.dynamics.parameters.EstimatableParameterSet.get_parameter_descriptions() method.

Returns:

Indices of the parameters corresponding to the description. The first element of the tuple is the start index, the second element is the size of the parameter.

Return type:

List[ tuple[int, int] ]

indices_for_parameter_type(self: tudatpy.kernel.dynamics.parameters.EstimatableParameterSet, parameter_type: tuple[tudatpy.kernel.dynamics.parameters_setup.EstimatableParameterTypes, tuple[str, str]]) list[tuple[int, int]]¶

Retrieve indices of parameter blocks matching a parameter identifier.

Matching rules:

  • If either identifier string is non-empty, exact matching is used on the full identifier.

  • If both strings are empty, matching is performed on the enum only.

  • If multiple parameter blocks match, all matches are returned.

  • If no parameter blocks match, an empty list is returned.

Parameters:

parameter_type (tuple[ EstimatableParameterTypes, tuple[str, str] ]) – Parameter identifier for which matching indices are retrieved.

Returns:

Matching (start_index, size) entries in parameter-set order.

Return type:

List[ tuple[int, int] ]

parameters_for_parameter_type(self: tudatpy.kernel.dynamics.parameters.EstimatableParameterSet, parameter_type: tuple[tudatpy.kernel.dynamics.parameters_setup.EstimatableParameterTypes, tuple[str, str]]) list[tudatpy.kernel.dynamics.parameters.EstimatableParameter]¶

Retrieve parameter objects matching a parameter identifier.

Matching rules are identical to indices_for_parameter_type().

Returned parameter objects are instances of EstimatableParameter.

Parameters:

parameter_type (tuple[ EstimatableParameterTypes, tuple[str, str] ]) – Parameter identifier for which matching parameter objects are retrieved.

Returns:

Matching parameter objects in parameter-set order.

Return type:

List[ EstimatableParameter ]

property consider_parameters¶

read-only

Set of consider parameters that are included in the parameter set.

Type:

EstimatableParameterSet

property constraints_size¶

read-only

Total size of linear constraint that is to be applied during estimation.

Type:

int

property estimated_and_consider_parameter_vector¶

Vector containing the parameter values of all parameters in the set (including consider parameters; concatenated after estimated parameters).

Type:

numpy.ndarray[numpy.float64[m, 1]]

property initial_multi_arc_states_size¶

read-only

Amount of initial state parameters in the set, which are treated in a multi-arc fashion.

Type:

int

property initial_single_arc_states_size¶

read-only

Amount of initial state parameters in the set, which are treated in a single-arc fashion.

Type:

int

property initial_states_size¶

read-only

Amount of initial state parameters contained in the set.

Type:

int

property parameter_set_size¶

read-only

Size of the parameter set, i.e. amount of estimatable parameters contained in the set.

Type:

int

property parameter_vector¶

Vector containing the parameter values of all parameters in the set (excluding consider parameters).

Type:

numpy.ndarray[numpy.float64[m, 1]]

EstimatableParameterSet.indices_for_parameter_type(...)

Retrieve indices of parameter blocks matching a parameter identifier.

EstimatableParameterSet.parameters_for_parameter_type(...)

Retrieve parameter objects matching a parameter identifier.