OutputSettings#

class OutputSettings(save_prefit_residuals: bool = True, save_postfit_residuals: bool = True, save_covariance_history: bool = True, save_consider_covariance_history: bool = True, save_state_deviation_history: bool = True, save_kalman_gains: bool = False, save_innovation_covariances: bool = False, save_nis_statistics: bool = False, save_smoothed_solution: bool = True, solution_output_path: str | None = None, solution_output_name: str | None = 'solution', fdm_output_path: str | None = None, fdm_output_name: str | None = None, fdm_output_format: Literal['json', 'pickle'] | None = 'json', trajectory_output_format: Literal['json', 'pickle'] | None = 'json', metadata: Dict | None = None, output_dir: str | None = None, run_name: str | None = 'scenario', save_reference_trajectory: bool = True, save_estimated_trajectory: bool = True, save_trajectory_stms: bool = True, save_full_covariance: bool = True)#

Bases: object

Configuration for SolutionOD output and storage.

Controls which quantities the filter stores after a run and where the JSON output files are written. All flags default to sensible values; override only what you need.

Parameters:
save_prefit_residualsbool

Store prefit residuals in the solution. Defaults to True.

save_postfit_residualsbool

Store postfit residuals in the solution. Defaults to True.

save_covariance_historybool

Store covariance evolution across measurement epochs. Defaults to True.

save_consider_covariance_historybool

Store consider-parameter covariance evolution. Defaults to True.

save_state_deviation_historybool

Store state deviation history across measurement epochs. Defaults to True.

save_kalman_gainsbool

Store Kalman gain matrices at each epoch (debugging). Defaults to False.

save_innovation_covariancesbool

Store innovation covariance matrices at each epoch (debugging). Defaults to False.

save_nis_statisticsbool

Store Normalized Innovation Squared (NIS) statistics. Defaults to False.

save_smoothed_solutionbool

Run the RTS/Bierman smoother after the forward pass and store the smoothed solution. Defaults to True.

solution_output_pathstr, optional

Directory for the JSON solution file. None disables JSON output.

solution_output_namestr, optional

Base filename (without extension) for the JSON solution file. Defaults to 'solution'.

fdm_output_pathstr, optional

Directory to write per-dataset JSON filter-data files. None disables filter-data output.

fdm_output_namestr, optional

Base name prefix for filter-data files.

fdm_output_format{“json”, “pickle”}, optional

On-disk format for the filter-data files — the per-dataset measurement records the filter rebuilds each iteration. Defaults to "json". This does not control the trajectory sidecars; see trajectory_output_format.

save_trajectory_stmsbool

Whether to write the STM sidecar beside each trajectory SPK. It is the largest artifact an OD run produces — one matrix per output epoch, per iteration — and the filter serves its own STM lookups from memory, so a run that does not read the sidecar back can turn it off. Defaults to True.

trajectory_output_format{“json”, “pickle”}, optional

On-disk format for the sidecars written beside each trajectory SPK: the STM history (*_stms.*) and the parameter / settings / mass-profile records. Defaults to "json".

The STM sidecar is by far the largest artifact an OD run produces — one matrix per output epoch, growing with the square of the state size — so a finely sampled arc or an extra solve-for parameter can push it into hundreds of megabytes of text. "pickle" writes the same content as a compact binary, which both writes and reads back considerably faster. Either format is read back transparently.

metadatadict, optional

Arbitrary user metadata (version, producer, description, etc.). Its keys are merged last into the saved metadata block, so they override the generated fields of the same name.

save_full_covariancebool

Write the final solution’s covariances as full matrices (covariance_full, covariance_smooth_full, covariance_consider_full) instead of their diagonals (*_diagonals). Iteration blocks always store diagonals, and a block never holds both. Defaults to True.

Attributes:
fdm_output_name

Base name prefix for filter-data files.

fdm_output_path

Directory to write per-dataset JSON filter-data files.

metadata

Arbitrary user metadata (version, producer, description, etc.).

output_dir

Single directory all artifacts for this run are written under.

run_name

Base name (prefix) shared by every artifact of this run.

save_consider_covariance_history

Store consider-parameter covariance evolution.

save_covariance_history

Store covariance evolution across measurement epochs.

save_innovation_covariances

Store innovation covariance matrices at each epoch (debugging).

save_kalman_gains

Store Kalman gain matrices at each epoch (debugging).

save_nis_statistics

Store Normalized Innovation Squared (NIS) statistics.

save_postfit_residuals

Store postfit residuals in the solution.

save_prefit_residuals

Store prefit residuals in the solution.

save_smoothed_solution

If True, run the RTS/Bierman smoother after the forward pass and store the smoothed solution.

save_state_deviation_history

Store state deviation history across measurement epochs.

solution_output_name

Base filename (without extension) for the JSON solution file.

solution_output_path

Directory to save the JSON solution file.

Methods

path_for(artifact[, ext])

Build a standardized <output_dir>/<run_name>_<artifact>.<ext> path.

See also

scarabaeus.SolutionOD

OD result container that respects these settings.

scarabaeus.FilterSettings

Bundles this object with covariance and process noise.

Notes

All boolean flags default to sensible values for a standard OD run. Override only what you need; unset flags revert to their defaults when an instance is created with no arguments.

path_for(artifact: str, ext: str = 'json') → str#

Build a standardized <output_dir>/<run_name>_<artifact>.<ext> path.

Parameters:
artifactstr

Artifact suffix, e.g. "solution", "reference", "estimated", "stms", "settings", "parameters".

extstr

File extension without the dot. Defaults to "json".

Returns:
str

The resolved path. Falls back to the current directory when output_dir is unset.

property fdm_output_name: str | None#

Base name prefix for filter-data files. When set, files are named {fdm_output_name}_{set_name}.json.

property fdm_output_path: str | None#

Directory to write per-dataset JSON filter-data files. None disables filter-data output.

property metadata: Dict#

Arbitrary user metadata (version, producer, description, etc.).

property output_dir: str | None#

Single directory all artifacts for this run are written under.

property run_name: str#

Base name (prefix) shared by every artifact of this run.

property save_consider_covariance_history: bool#

Store consider-parameter covariance evolution. Defaults to True.

property save_covariance_history: bool#

Store covariance evolution across measurement epochs. Defaults to True.

property save_innovation_covariances: bool#

Store innovation covariance matrices at each epoch (debugging). Defaults to False.

property save_kalman_gains: bool#

Store Kalman gain matrices at each epoch (debugging). Defaults to False.

property save_nis_statistics: bool#

Store Normalized Innovation Squared (NIS) statistics. Defaults to False.

property save_postfit_residuals: bool#

Store postfit residuals in the solution. Defaults to True.

property save_prefit_residuals: bool#

Store prefit residuals in the solution. Defaults to True.

property save_smoothed_solution: bool#

If True, run the RTS/Bierman smoother after the forward pass and store the smoothed solution. Defaults to True.

property save_state_deviation_history: bool#

Store state deviation history across measurement epochs. Defaults to True.

property solution_output_name: str | None#

Base filename (without extension) for the JSON solution file.

property solution_output_path: str | None#

Directory to save the JSON solution file. None disables JSON output.