biases¶

This module contains a set of factory functions for setting up the biases for observation models.

The functions in this module create objects of type ObservationBiasSettings, which define settings for a type of observation bias. The main interface with Tudat is that these objects are used as input to the observation model functions created in the model_settings module.

For an ideal observation \(h(t)\), this bias models created through the settings in this module modify this into a biased (true) observation \(\tilde{h}(t)\), with the mapping from ideal to true observation defined by the specific factory functions below.

More details on the link with the observation model is given on the user guide .

Functions¶

absolute_bias(bias_value)

Function for creating settings for an absolute observation bias.

relative_bias(bias_value)

Function for creating settings for a relative observation bias.

time_drift_bias(bias_value, 1]], ...)

Function for creating settings for a time-drift bias.

time_bias(time_bias, associated_link_end)

Function for creating settings for a constant observation time bias.

combined_bias(bias_list)

Function for creating settings for a combined observation bias.

arcwise_absolute_bias(arc_start_times, ...)

Function for creating settings for arc-wise absolute observation biases.

arcwise_absolute_bias_per_time(...)

Function for creating settings for arc-wise absolute observation biases.

arcwise_relative_bias(arc_start_times, ...)

Function for creating settings for arc-wise relative observation biases.

arcwise_relative_bias_per_time(...)

Function for creating settings for arc-wise relative observation biases.

arc_wise_time_drift_bias(bias_value, 1]]], ...)

Function for creating settings for arc-wise time-drift biases.

arc_wise_time_drift_bias_per_time(...)

Function for creating settings for arc-wise time-drift biases.

arcwise_time_bias(...)

Function for creating settings for arc-wise time biases for observations.

clock_induced_bias(body_name, station_name)

Function for creating settings for a clock-induced observation bias.

two_way_time_scale_range_bias()

Function for creating settings for a two-way range time scale bias.

absolute_bias(bias_value: numpy.ndarray[numpy.float64[m, 1]]) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for an absolute observation bias.

Function for creating settings for an absolute observation bias. When calculating the observable value, applying this setting will take the physically ideal observation \(h\), and modify it to obtain the biased observation \(\tilde{h}\) as follows:

\[\tilde{h}=h+K\]

where \(K\) is the bias_value. For an observable with size greater than 1, \(K\) is a vector and the addition is component-wise.

Parameters:

bias_value (numpy.ndarray) – A vector containing the bias that is to be applied to the observable. This vector should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

Returns:

Instance of the ObservationBiasSettings defining the settings for a constant, absolute observation bias.

Return type:

ConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the absolute_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function absolute_bias() requires a numpy.array of bias values in input
bias_array = np.array([1e-2])
absolute_bias_settings = biases.absolute_bias(bias_array)

# Show that it returns an ObservationBiasSettings object.
print(absolute_bias_settings)
relative_bias(bias_value: numpy.ndarray[numpy.float64[m, 1]]) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for a relative observation bias.

Function for creating settings for a relative observation bias. When calculating the observable value, applying this setting will take the physically ideal observation \(h\), and modify it to obtain the biased observation \(\tilde{h}\) as follows:

\[\tilde{h}=h(1+K)\]

where \(K\) is the`bias_value`. For an observable with size greater than 1, \(K\) is a vector and the multiplication is component-wise.

Parameters:

bias_value (numpy.ndarray) – A vector containing the bias that is to be applied to the observable. This vector should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

Returns:

Instance of the ObservationBiasSettings class, defining the settings for a constant, relative observation bias.

Return type:

ConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the relative_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function relative_bias() requires a numpy.array of bias values in input
bias_array = np.array([1e-2])
relative_bias_settings_settings = biases.relative_bias(bias_array)

# Show that it returns an ObservationBiasSettings object.
print(relative_bias_settings_settings)
combined_bias(bias_list: list[tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings]) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for a combined observation bias.

Function for creating settings for a combined observation bias, calculating by combining any number of bias types. Each contribution of the combined bias is computed from the unbiased observable, so when applying both a relative and absolute bias, we get:

\[\tilde{h}=h+K_{a}+hK_{r}\]

And, crucially:

\[\tilde{h}\neq (h+K_{a})(1+K_{r})\]

where \(K_{r}\) and \(K_{a}\) is the relative and absolute bias, respectively.

Parameters:

bias_list (list[ObservationBiasSettings]) – A list containing the bias settings that are to be applied to the observable.

Returns:

Instance of the ObservationBiasSettings derived multipleObservationBiasSettings class, combining the settings for multiple observation biases.

Return type:

multipleObservationBiasSettings

Examples

# Code Snippet to showcase the use of the combined_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function combined_bias() allows to combine multiple ObservationBiasSettings objects.
# Let's combine absolute, relative and time_drift biases.
bias_array = np.array([1e-2])

# Define absolute and relative bias settings
absolute_bias_settings = biases.absolute_bias(bias_array)
relative_bias_settings = biases.absolute_bias(bias_array)

# Define Time Drift Bias
time_link_end = biases.receiver
ref_epoch = 0
time_drift_bias_settings = biases.time_drift_bias(bias_array, time_link_end, ref_epoch)

# combined_bias takes a list of ObservationBiasSettings objects as input
bias_list = [absolute_bias_settings, relative_bias_settings, time_drift_bias_settings]
combined_bias = biases.combined_bias(bias_list)

# Show that it returns an ObservationBiasSettings object.
print(combined_bias)
arcwise_absolute_bias(arc_start_times: list[float | typing.SupportsIndex], bias_values: list[numpy.ndarray[numpy.float64[m, 1]]], reference_link_end_type: tudat::observation_models::LinkEndType) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise absolute observation biases.

Function for creating settings for arc-wise absolute observation biases. This bias setting differs from the absolute_bias setting only through the option of setting the bias_value \(K\) to a different (constant) value for each arc.

Parameters:
  • arc_start_times (list[ astro.time_representation.Time ]) – List containing starting times for each arc.

  • bias_values (list[ numpy.ndarray ]) – List of arc-wise bias vectors that are to be applied to the given observable. The vectors should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • reference_link_end_type (LinkEndType) – Defines the link end (via the LinkEndType) which is used as a reference for observation times.

Returns:

Instance of the ObservationBiasSettings derived ArcWiseConstantObservationBiasSettings class.

Return type:

ArcWiseConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the arcwise_absolute_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function arcwise_absolute_bias() requires:
# 1) an arc_start_times list ,2) a numpy.array of bias values in input, 3) reference_link_end_type
# Let's simulate two arcs
arc_start_times = [0, 60] # define start time in seconds
arcwise_bias_array = [np.array([1e-2]), np.array([2e-2])] # set arc bias
reference_link_end_type = biases.receiver # set bias at receiving link end
arcwise_absolute_bias_settings = biases.arcwise_absolute_bias(arc_start_times, arcwise_bias_array, biases.receiver)

# Show that it returns an ObservationBiasSettings object.
print(arcwise_absolute_bias_settings)
arcwise_absolute_bias_per_time(bias_values_per_start_time: dict[float | typing.SupportsIndex, numpy.ndarray[numpy.float64[m, 1]]], reference_link_end_type: tudat::observation_models::LinkEndType) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise absolute observation biases.

Function for creating settings for arc-wise absolute observation biases. This bias setting differs from the absolute_bias setting only through the option of setting the bias_value \(K\) to a different (constant) value for each arc.

Parameters:
  • bias_values_per_start_time (Dict[astro.time_representation.Time, numpy.ndarray[numpy.float64[m, 1]]]) – Dictionary, in which the bias value vectors for each arc are directly mapped to the starting times of the respective arc. The vectors should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • reference_link_end_type (LinkEndType) – Defines the link end (via the LinkEndType) which is used as a reference for observation times.

Returns:

Instance of the ObservationBiasSettings derived ArcWiseConstantObservationBiasSettings class.

Return type:

ArcWiseConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the arcwise_absolute_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function arcwise_absolute_bias_settings_per_time() requires:
# 1) a dictionary with times as keys and bias values as values ,2) a reference_link_end_type
# Let's simulate two arcs
bias_value_per_start_time = dict()
bias_value_per_start_time[0] = np.array([1e-2])
bias_value_per_start_time[60] = np.array([2e-2])
reference_link_end_type = biases.receiver # set bias at receiving link end

arcwise_absolute_bias_settings_per_time = biases.arcwise_absolute_bias_per_time(bias_value_per_start_time, reference_link_end_type)

# Show that it returns an ObservationBiasSettings object.
print(arcwise_absolute_bias_settings_per_time)
arcwise_relative_bias(arc_start_times: list[float | typing.SupportsIndex], bias_values: list[numpy.ndarray[numpy.float64[m, 1]]], reference_link_end_type: tudat::observation_models::LinkEndType) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise relative observation biases.

Function for creating settings for arc-wise relative observation biases. This bias setting differs from the relative_bias setting only through the option of setting the bias_value \(K\) to a different (constant) value for each arc.

Parameters:
  • arc_start_times (list[ astro.time_representation.Time ]) – List containing starting times for each arc.

  • bias_values (list[ numpy.ndarray ]) – List of arc-wise bias vectors that are to be applied to the given observable. The vectors should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • reference_link_end_type (LinkEndType) – Defines the link end (via the LinkEndType) which is used as a reference for observation times.

Returns:

Instance of the ObservationBiasSettings derived ArcWiseConstantObservationBiasSettings class.

Return type:

ArcWiseConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the arcwise_relative_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function arcwise_relative_bias() requires:
# 1) an arc_start_times list ,2) a numpy.array of bias values in input, 3) reference_link_end_type
# Let's simulate two arcs
arc_start_times = [0, 60] # define start time in seconds
arcwise_bias_array = [np.array([1e-2]), np.array([2e-2])] # set arc bias
reference_link_end_type = biases.receiver # set bias at receiving link end
arcwise_relative_bias_settings = biases.arcwise_relative_bias(arc_start_times, arcwise_bias_array, reference_link_end_type)

# Show that it returns an ObservationBiasSettings object.
print(arcwise_relative_bias_settings)
arcwise_relative_bias_per_time(bias_values_per_start_time: dict[float | typing.SupportsIndex, numpy.ndarray[numpy.float64[m, 1]]], reference_link_end_type: tudat::observation_models::LinkEndType) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise relative observation biases.

Function for creating settings for arc-wise relative observation biases. This bias setting differs from the relative_bias setting only through the option of setting the bias_value \(K\) to a different (constant) value for each arc.

Parameters:
  • bias_values_per_start_time (Dict[astro.time_representation.Time, numpy.ndarray[numpy.float64[m, 1]]]) – Dictionary, in which the bias value vectors for each arc are directly mapped to the starting times of the respective arc. The vectors should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • reference_link_end_type (LinkEndType) – Defines the link end (via the LinkEndType) which is used as a reference for observation times.

Returns:

Instance of the ObservationBiasSettings derived ArcWiseConstantObservationBiasSettings class.

Return type:

ArcWiseConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the arcwise_relative_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function arcwise_relative_bias_per_time() requires:
# 1) a dictionary with times as keys and bias values as values ,2) a reference_link_end_type
# Let's simulate two arcs
bias_value_per_start_time = dict()
bias_value_per_start_time[0] = np.array([1e-2])
bias_value_per_start_time[60] = np.array([2e-2])
reference_link_end_type = biases.receiver # set bias at receiving link end

arcwise_relative_bias_settings_per_time = biases.arcwise_relative_bias_per_time(bias_value_per_start_time, reference_link_end_type)

# Show that it returns an ObservationBiasSettings object.
print(arcwise_relative_bias_settings_per_time)
clock_induced_bias(body_name: str, station_name: str) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for a clock-induced observation bias.

This function creates settings for a bias that is induced by the clock of a specific timing system associated with a body or ground station.

Parameters:
  • body_name (str) – Name of the body where the timing system is located.

  • station_name (str) – Name of the station (if any) where the timing system is located.

Returns:

Instance of the ObservationBiasSettings class for a clock-induced bias.

Return type:

tudatpy.estimation.observable_models_setup.biases.ObservationBiasSettings

time_bias(time_bias: float | SupportsIndex, associated_link_end: tudat::observation_models::LinkEndType) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for a constant observation time bias.

Function for creating settings for a constant observation time bias. When calculating the observable value \(h\) with time tag \(t\), applying this setting will modify the time tag as follows:

\[\tilde{t}=t+K\]

where \(K\) is the bias_value, and subsequently compute the observable using the biased time tag as input.

Parameters:

time_bias (float) – Value of the time bias (in seconds)

Returns:

Instance of the ObservationBiasSettings derived class defining the settings for a constant time bias.

Return type:

ObservationBiasSettings

arcwise_time_bias(time_bias_per_arc_start_time: dict[float | typing.SupportsIndex, float | typing.SupportsIndex], associated_link_end: tudat::observation_models::LinkEndType) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise time biases for observations.

Function for creating settings for arc-wise time biases for observations. This bias setting differs from the time_bias setting only through the option of setting the bias_value \(K\) to a different (constant) value for each arc.

Parameters:
  • bias_values_per_start_time (Dict[astro.time_representation.Time, float]]) – Dictionary, in which the bias value for each arc are directly mapped to the starting times of the respective arc.

  • associated_link_end (LinkEndType) – Defines the link end (via the LinkEndType) which is used as a reference for observation times.

Returns:

Instance of the ObservationBiasSettings derived class defining the settings for aarcwise constant time bias.

Return type:

ObservationBiasSettings

time_drift_bias(bias_value: numpy.ndarray[numpy.float64[m, 1]], time_link_end: tudat::observation_models::LinkEndType, ref_epoch: float | typing.SupportsIndex) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for a time-drift bias.

Function for creating settings for a time-drift bias. When calculating the observable value, applying this setting will take the physically ideal observation \(h\) with time tag \(t\), and modify it to obtain the biased observation \(\tilde{h}\) as follows:

\[\tilde{h}=h + K (t-t_{0})\]

where \(K\) is the bias_value. For an observable with size greater than 1, \(K\) is a vector and the addition is component-wise.

Parameters:
  • bias_value (numpy.ndarray) – A vector containing the bias that is to be applied to the observable. This vector should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • time_link_end (LinkEndType) – Defines the link end (via the LinkEndType) which is used the current time.

  • ref_epoch (astro.time_representation.Time) – Defines the reference epoch \(t_{0}\) at which the effect of the time drift is initialised.

Returns:

Instance of the ObservationBiasSettings derived constantTimeDriftBias class, defining the settings for a constant, relative observation bias.

Return type:

constantTimeDriftBias

Examples

# Code Snippet to showcase the use of the time_drift_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function time_drift_bias() requires a numpy.array of bias value, time_link_end and ref_epoch as inputs
bias_array = np.array([1e-2])
time_link_end = biases.receiver
ref_epoch = 0
time_drift_bias_settings = biases.time_drift_bias(bias_array, time_link_end, ref_epoch)

# Show that it returns an ObservationBiasSettings object.
print(time_drift_bias_settings)
arc_wise_time_drift_bias(bias_value: list[numpy.ndarray[numpy.float64[m, 1]]], arc_start_times: list[float | typing.SupportsIndex], time_link_end: tudat::observation_models::LinkEndType, ref_epochs: list[float | typing.SupportsIndex]) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise time-drift biases.

Function for creating settings for arc-wise time-drift biases. This bias setting differs from the time_drift_bias setting only through the option of setting the bias_value (time drift bias) to a different (constant) value for each arc.

Parameters:
  • bias_value (numpy.ndarray) – Constant time drift bias that is to be considered for the observation time. This vector should be the same size as the observable to which it is assigned (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • arc_start_times (list[ astro.time_representation.Time ]) – List containing starting times for each arc.

  • time_link_end (LinkEndType) – Defines the link end (via the LinkEndType) which is used the current time.

  • ref_epochs (list[ astro.time_representation.Time ]) – List containing the arc-wise reference epochs at which the effect of the arc-wise time drift is initialised.

Returns:

Instance of the ObservationBiasSettings derived ArcWiseConstantObservationBiasSettings class.

Return type:

ArcWiseConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the arcwise_time_drift_bias function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function arcwise_time_drift_bias() requires:
# 1) an arc_start_times list ,2) a numpy.array of bias values in input, 3) reference_link_end_type, 4) list of reference epochs
# Let's simulate two arcs
arc_start_times = [0, 60] # define start time in seconds
arcwise_bias_array = [np.array([1e-2]), np.array([2e-2])] # set arc bias
reference_link_end_type = biases.receiver # set bias at receiving link end
ref_epochs = [0,60]
arcwise_time_drift_bias_settings = biases.arc_wise_time_drift_bias(arcwise_bias_array, arc_start_times, biases.receiver, ref_epochs)

# Show that it returns an ObservationBiasSettings object.
print(arcwise_time_drift_bias_settings)
arc_wise_time_drift_bias_per_time(bias_value_per_start_time: dict[float | typing.SupportsIndex, numpy.ndarray[numpy.float64[m, 1]]], time_link_end: tudat::observation_models::LinkEndType, ref_epochs: list[float | typing.SupportsIndex]) tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for arc-wise time-drift biases.

Function for creating settings for arc-wise time-drift biases. This bias setting differs from the time_drift_bias setting only through the option of setting the bias_value (time drift bias) to a different (constant) value for each arc.

Parameters:
  • bias_value_per_start_time (Dict[astro.time_representation.Time, numpy.ndarray[numpy.float64[m, 1]]]) – Dictionary, in which the time bias value vectors for each arc are directly mapped to the starting times of the respective arc. The vectors should be the same size as the observable to which it is applied (e.g. size 1 for a range observable, size 2 for angular position, etc.)

  • time_link_end (LinkEndType) – Defines the link end (via the LinkEndType) which is used the current time.

  • ref_epochs (list[ astro.time_representation.Time ]) – List containing the arc-wise reference epochs at which the effect of the arc-wise time drift is initialised.

Returns:

Instance of the ObservationBiasSettings derived ArcWiseConstantObservationBiasSettings class.

Return type:

ArcWiseConstantObservationBiasSettings

Examples

# Code Snippet to showcase the use of the arcwise_time_drift_bias_per_time function
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

# The function arcwise_time_drift_bias_per_time() requires:
# 1) an arc_start_times list ,2)  a dictionary with times as keys and bias values as values, 2) a reference_link_end_type, 3) reference_link_end_type, 4) list of reference epochs
# Let's simulate two arcs
bias_value_per_start_time = dict()
bias_value_per_start_time[0] = np.array([1e-2])
bias_value_per_start_time[60] = np.array([2e-2])
reference_link_end_type = biases.receiver # set bias at receiving link end
ref_epochs = [0,60]
arcwise_time_drift_bias_settings = biases.arc_wise_time_drift_bias(bias_value_per_start_time, reference_link_end_type, ref_epochs)

# Show that it returns an ObservationBiasSettings object.
print(arcwise_time_drift_bias_settings)
two_way_time_scale_range_bias() tudatpy.kernel.estimation.observable_models_setup.biases.ObservationBiasSettings¶

Function for creating settings for a two-way range time scale bias.

This bias accounts for the difference in time scales (e.g., TDB and TCB) in the computation of two-way range observables.

Returns:

Instance of the ObservationBiasSettings class for a two-way range time scale bias.

Return type:

tudatpy.estimation.observable_models_setup.biases.ObservationBiasSettings

Classes¶

ObservationBiasSettings

Base class to defining observation bias settings.

class ObservationBiasSettings¶

Bases: pybind11_object

Base class to defining observation bias settings.

Base class to defining observation bias settings. Specific observation bias settings must be defined using an object derived from this class. Instances of this class are typically created via the absolute_bias() or relative_bias() function.

Examples

# Code snippet to show the creation of an ObservationBiasSettings object
# using absolute and relative bias settings
from tudatpy.estimation.observable_models_setup import biases
import numpy as np

bias_array = np.array([1e-2])

# Use absolute_bias function
absolute_bias_settings = biases.absolute_bias(bias_array)
# Show that it is an ObservationBiasSettings object.
print(absolute_bias_settings)

# Use relative_bias function
relative_bias_settings = biases.relative_bias(bias_array)
# Show that it is an ObservationBiasSettings object.
print(relative_bias_settings)