FilterDataManager#

class FilterDataManager(datasets=None, editing_method=None, editing_datasets=None, editing_kwargs=None, save_path=None, save_name=None)#

Bases: object

Manages, edits, and organizes measurement datasets for orbit determination filters.

The class provides utilities to combine multiple MeasurementDataSet objects into a unified time-indexed structure keyed by spacecraft time t2. This enables efficient retrieval and reconstruction of synchronized measurement blocks across heterogeneous datasets, instruments, and measurement types.

In addition, the class supports optional pre-processing and measurement editing operations such as chi-squared filtering, lasso-based selection, and date-range editing before the datasets are indexed and passed to the estimation framework.

The resulting combined structure is designed to support linearized and statistical orbit determination workflows involving multi-instrument, multi-spacecraft, or mixed observable estimation problems.

Parameters:
  • datasets (list of MeasurementDataSet, optional) – Input datasets. Nested lists are flattened one level.

  • editing_method (str or None) – Editing mode to apply before building indices. One of 'lasso', 'chi2', 'date_range', 'interactive_date_range', or None.

  • editing_datasets (None or str or list of str) – Which datasets to edit. None = all, a string = one by name, a list of strings = a specific subset.

  • editing_kwargs (dict or None) – Extra keyword arguments forwarded to the editing method.

  • save_path (str or None) – Directory path to save combined data .npz files.

  • save_name (str or None) – Optional name prefix included in saved file names.

Notes

Two-way radiometric time-tag convention used throughout this class:

  • t1 — ground station transmit epoch (uplink signal sent).

  • t2spacecraft time (signal reflection / turnaround epoch).

  • t3 — ground station receive epoch (downlink signal received).

Datasets are indexed by spacecraft epoch t2; all datasets must use the same time-tag convention. Nested list inputs are flattened one level automatically.

See also

scarabaeus.MeasurementEditing

Provides the lasso/chi2/date-range editing methods.

scarabaeus.FilterOD

Base filter that consumes the combined indexed structure.

Attributes:
dataset_names

Return the names of the datasets.

datasets

Return the list of managed datasets.

indices_by_t2

Return the indices grouped by unique t2 values.

Methods

get_combined()

Build and return the full combined measurement structure for all epochs.

get_combined_for_t2(t2_val)

Build and return the combined measurement block for a single epoch.

get_spacecraft_times()

Return sorted unique spacecraft receive times with at least one valid measurement.

get_combined() dict#

Build and return the full combined measurement structure for all epochs.

Iterates over every unique t2 value and assembles numeric arrays, stacked partial-derivative matrices, and list-type metadata fields. Measurements flagged as outliers are dropped before returning.

Returns:

Keys are unique t2 float values sorted ascending. Each value is a dict with the fields documented in create_combined_from_indices(): t1, t2, t3, observed, computed, residuals, sigma, outlier_flag, partials, instruments, measurement_types, dataset_names, dataset_refs.

Return type:

dict

Raises:

RuntimeError – If build_indices() has not been called yet.

get_combined_for_t2(t2_val: float) dict#

Build and return the combined measurement block for a single epoch.

Parameters:

t2_val (float) – Spacecraft receive time for which measurements are requested.

Returns:

Single-key dict {t2_val: block}, where block has the same field structure as described in get_combined().

Return type:

dict

Raises:
  • RuntimeError – If indices have not been built yet.

  • KeyError – If t2_val is not present in the index.

get_spacecraft_times() ndarray#

Return sorted unique spacecraft receive times with at least one valid measurement.

A t2 value is included only when at least one of its measurements has outlier_flag == False. Fully rejected epochs are silently omitted.

Returns:

1-D array of float64 spacecraft receive times sorted ascending.

Return type:

np.ndarray

Raises:

RuntimeError – If indices have not been built yet.

property dataset_names: list#

Return the names of the datasets.

property datasets: list#

Return the list of managed datasets.

property indices_by_t2: dict#

Return the indices grouped by unique t2 values.