FilterDataManager#
- class FilterDataManager(datasets=None, editing_method=None, editing_datasets=None, editing_kwargs=None, save_path=None, save_name=None)#
Bases:
objectManages, edits, and organizes measurement datasets for orbit determination filters.
The class provides utilities to combine multiple
MeasurementDataSetobjects into a unified time-indexed structure keyed by spacecraft timet2. 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 (
listofMeasurementDataSet, optional) – Input datasets. Nested lists are flattened one level.editing_method (
strorNone) – Editing mode to apply before building indices. One of'lasso','chi2','date_range','interactive_date_range', orNone.editing_datasets (
Noneorstrorlistofstr) – Which datasets to edit.None= all, a string = one by name, a list of strings = a specific subset.editing_kwargs (
dictorNone) – Extra keyword arguments forwarded to the editing method.save_path (
strorNone) – Directory path to save combined data.npzfiles.save_name (
strorNone) – 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).t2— spacecraft 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.MeasurementEditingProvides the lasso/chi2/date-range editing methods.
scarabaeus.FilterODBase filter that consumes the combined indexed structure.
- Attributes:
dataset_namesReturn the names of the datasets.
datasetsReturn the list of managed datasets.
indices_by_t2Return the indices grouped by unique t2 values.
Methods
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.
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
t2value 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
t2float values sorted ascending. Each value is a dict with the fields documented increate_combined_from_indices():t1,t2,t3,observed,computed,residuals,sigma,outlier_flag,partials,instruments,measurement_types,dataset_names,dataset_refs.- Return type:
- 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}, whereblockhas the same field structure as described inget_combined().- Return type:
- Raises:
RuntimeError – If indices have not been built yet.
KeyError – If
t2_valis not present in the index.
- get_spacecraft_times() ndarray#
Return sorted unique spacecraft receive times with at least one valid measurement.
A
t2value is included only when at least one of its measurements hasoutlier_flag == False. Fully rejected epochs are silently omitted.- Returns:
1-D array of
float64spacecraft receive times sorted ascending.- Return type:
np.ndarray- Raises:
RuntimeError – If indices have not been built yet.