Skip to content

Estimation State Plots

Visualize estimation errors and state values with optional covariance uncertainty bands. Supports multi-filter overlays and configurable NxM grid layouts.

Solver API

plot_estimator_state_error

plot_estimator_state_error(solvers, true_trajectory, state_index=0, sigma=None, labels=None, colors=None, state_label=None, time_units='seconds', orbital_period=None, measurements=None, backend='matplotlib', backend_config=None, **kwargs) -> object

Plot state error time series for one or more solved estimators.

Extracts state estimates and truth from solver objects, computes errors, and delegates to :func:plot_estimator_state_error_from_arrays.

Parameters:

Name Type Description Default
solvers list

List of solved estimator objects (BatchLeastSquares, ExtendedKalmanFilter, or UnscentedKalmanFilter).

required
true_trajectory object

An OrbitTrajectory instance representing ground truth.

required
state_index int

Which state component to plot. Default: 0.

0
sigma float or None

Sigma multiplier for covariance bands. None means no bands are drawn. Default: None.

None
labels list[str] or None

Legend label per solver. Default: generated labels.

None
colors list[str] or None

Colour per solver. Default: colour cycle.

None
state_label str or None

Y-axis label. Default: "State Error".

None
time_units str or callable

Time axis units. One of "seconds", "minutes", "hours", "orbits", "epoch", or a callable. Default: "seconds".

'seconds'
orbital_period float or None

Orbital period in seconds. Required when time_units="orbits". Default: None.

None
measurements list or None

Optional list of Observation objects to overlay as scatter markers at state_index. Default: None.

None
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration.

None
**kwargs dict

Forwarded to the array-API function.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

plot_estimator_state_value

plot_estimator_state_value(solvers, true_trajectory, state_index=0, sigma=None, labels=None, colors=None, state_label=None, time_units='seconds', orbital_period=None, backend='matplotlib', backend_config=None, **kwargs) -> object

Plot state value time series for one or more solved estimators with truth overlay.

Extracts estimated state history and truth from solver objects, then delegates to :func:plot_estimator_state_value_from_arrays.

Parameters:

Name Type Description Default
solvers list

List of solved estimator objects.

required
true_trajectory object

An OrbitTrajectory instance representing ground truth.

required
state_index int

Which state component to plot. Default: 0.

0
sigma float or None

Sigma multiplier for covariance bands. None means no bands are drawn. Default: None.

None
labels list[str] or None

Legend label per solver. Default: generated labels.

None
colors list[str] or None

Colour per solver. Default: colour cycle.

None
state_label str or None

Y-axis label. Default: "State Value".

None
time_units str or callable

Time axis units. Default: "seconds".

'seconds'
orbital_period float or None

Orbital period in seconds. Required when time_units="orbits". Default: None.

None
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration.

None
**kwargs dict

Forwarded to the array-API function.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

plot_estimator_state_error_grid

plot_estimator_state_error_grid(solvers, true_trajectory, state_indices=None, sigma=None, labels=None, colors=None, state_labels=None, ncols=3, time_units='seconds', orbital_period=None, backend='matplotlib', backend_config=None, **kwargs) -> object

Plot a grid of state error time series for one or more solved estimators.

Extracts state errors for all (or selected) state components and delegates to :func:plot_estimator_state_error_grid_from_arrays.

Parameters:

Name Type Description Default
solvers list

List of solved estimator objects.

required
true_trajectory object

An OrbitTrajectory instance representing ground truth.

required
state_indices list[int] or None

State components to include. None means all components. Default: None.

None
sigma float or None

Sigma multiplier for covariance bands. Default: None.

None
labels list[str] or None

Legend label per solver. Default: generated.

None
colors list[str] or None

Colour per solver. Default: colour cycle.

None
state_labels list[str] or None

Y-axis label per state subplot. Default: generated.

None
ncols int

Number of subplot columns. Default: 3.

3
time_units str or callable

Time axis units. Default: "seconds".

'seconds'
orbital_period float or None

Orbital period in seconds. Default: None.

None
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration.

None
**kwargs dict

Forwarded to the array-API function.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

plot_estimator_state_value_grid

plot_estimator_state_value_grid(solvers, true_trajectory, state_indices=None, sigma=None, labels=None, colors=None, state_labels=None, ncols=3, time_units='seconds', orbital_period=None, backend='matplotlib', backend_config=None, **kwargs) -> object

Plot a grid of state value time series for one or more solved estimators.

Extracts estimated state history and truth for all (or selected) state components and delegates to :func:plot_estimator_state_value_grid_from_arrays.

Parameters:

Name Type Description Default
solvers list

List of solved estimator objects.

required
true_trajectory object

An OrbitTrajectory instance representing ground truth.

required
state_indices list[int] or None

State components to include. None means all components. Default: None.

None
sigma float or None

Sigma multiplier for covariance bands. Default: None.

None
labels list[str] or None

Legend label per solver. Default: generated.

None
colors list[str] or None

Colour per solver. Default: colour cycle.

None
state_labels list[str] or None

Y-axis label per state subplot. Default: generated.

None
ncols int

Number of subplot columns. Default: 3.

3
time_units str or callable

Time axis units. Default: "seconds".

'seconds'
orbital_period float or None

Orbital period in seconds. Default: None.

None
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration.

None
**kwargs dict

Forwarded to the array-API function.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

Array API

plot_estimator_state_error_from_arrays

plot_estimator_state_error_from_arrays(times, errors, sigmas=None, labels=None, colors=None, state_label=None, time_label='Time [s]', measurements=None, backend='matplotlib', backend_config=None, **kwargs) -> object

Plot estimator state error time series from raw numpy arrays.

Draws one error line per series with optional ±sigma covariance bands and an optional measurement scatter overlay.

Parameters:

Name Type Description Default
times list[ndarray]

List of 1-D time arrays, one per series.

required
errors list[ndarray]

List of 1-D error arrays, one per series.

required
sigmas list[ndarray] or None

List of 1-D sigma arrays (the half-width of the covariance band), one per series. None means no bands are drawn. Default: None.

None
labels list[str] or None

Legend label for each series. Default labels are "Series 0", "Series 1", …

None
colors list[str] or None

Colour for each series. Defaults to the internal colour cycle.

None
state_label str or None

Y-axis label. Default: "State Error".

None
time_label str

X-axis label. Default: "Time [s]".

'Time [s]'
measurements tuple or None

Optional (times_array, values_array) pair to overlay as scatter markers. Default: None.

None
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration keys. Matplotlib keys: figsize, legend_loc, dark_mode, ylabel_pad. Plotly keys: width, height.

None
**kwargs dict

Ignored (reserved for forward-compatibility).

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

plot_estimator_state_value_from_arrays

plot_estimator_state_value_from_arrays(times, values, true_values=None, sigmas=None, labels=None, colors=None, state_label=None, time_label='Time [s]', backend='matplotlib', backend_config=None, **kwargs) -> object

Plot estimator state value time series from raw numpy arrays.

Draws one estimated-value line per series with an optional truth reference line and optional ±sigma covariance bands.

Parameters:

Name Type Description Default
times list[ndarray]

List of 1-D time arrays, one per series.

required
values list[ndarray]

List of 1-D value arrays, one per series.

required
true_values ndarray or None

1-D truth reference array drawn as a black dashed line. Must share the same time axis as the first series. Default: None.

None
sigmas list[ndarray] or None

List of 1-D sigma arrays, one per series. Default: None.

None
labels list[str] or None

Legend labels. Default: "Series 0", …

None
colors list[str] or None

Colours for each series. Default: colour cycle.

None
state_label str or None

Y-axis label. Default: "State Value".

None
time_label str

X-axis label. Default: "Time [s]".

'Time [s]'
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration. Matplotlib keys: figsize, legend_loc, dark_mode, ylabel_pad. Plotly keys: width, height.

None
**kwargs dict

Ignored.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

plot_estimator_state_error_grid_from_arrays

plot_estimator_state_error_grid_from_arrays(times, errors, sigmas=None, labels=None, colors=None, state_labels=None, ncols=3, time_label='Time [s]', backend='matplotlib', backend_config=None, **kwargs) -> object

Plot a grid of state error time series from raw numpy arrays.

Each subplot corresponds to one state component. One line (and optional sigma band) is drawn per series.

Parameters:

Name Type Description Default
times list[ndarray]

List of 1-D time arrays, one per series.

required
errors list[ndarray]

List of 2-D arrays of shape (N, n_states), one per series.

required
sigmas list[ndarray] or None

List of 2-D arrays of shape (N, n_states), one per series. Default: None.

None
labels list[str] or None

Legend labels. Default: "Series 0", …

None
colors list[str] or None

Colours. Default: colour cycle.

None
state_labels list[str] or None

Y-axis label for each state subplot. Default: "State 0", "State 1", …

None
ncols int

Number of columns in the subplot grid. Default: 3.

3
time_label str

X-axis label. Default: "Time [s]".

'Time [s]'
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration. Matplotlib keys: figsize, legend_subplot, legend_loc, dark_mode, ylabel_pad. Plotly keys: width, height.

None
**kwargs dict

Ignored.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.

plot_estimator_state_value_grid_from_arrays

plot_estimator_state_value_grid_from_arrays(times, values, true_values=None, sigmas=None, labels=None, colors=None, state_labels=None, ncols=3, time_label='Time [s]', backend='matplotlib', backend_config=None, **kwargs) -> object

Plot a grid of state value time series from raw numpy arrays.

Each subplot corresponds to one state component. An optional truth reference line (black dashed) and optional sigma bands can be overlaid.

Parameters:

Name Type Description Default
times list[ndarray]

List of 1-D time arrays, one per series.

required
values list[ndarray]

List of 2-D arrays of shape (N, n_states), one per series.

required
true_values ndarray or None

2-D array of shape (N, n_states) for the truth reference. Default: None.

None
sigmas list[ndarray] or None

List of 2-D arrays of shape (N, n_states), one per series. Default: None.

None
labels list[str] or None

Legend labels. Default: "Series 0", …

None
colors list[str] or None

Colours. Default: colour cycle.

None
state_labels list[str] or None

Y-axis labels per state. Default: "State 0", "State 1", …

None
ncols int

Number of columns in the subplot grid. Default: 3.

3
time_label str

X-axis label. Default: "Time [s]".

'Time [s]'
backend str

"matplotlib" or "plotly". Default: "matplotlib".

'matplotlib'
backend_config dict or None

Backend-specific configuration. Matplotlib keys: figsize, legend_subplot, legend_loc, dark_mode, ylabel_pad. Plotly keys: width, height.

None
**kwargs dict

Ignored.

{}

Returns:

Type Description
object

Generated matplotlib or plotly figure object.


See Also