MeasurementDataSet#
- class MeasurementDataSet(set_name: str, measurements: list, names: list[str], instrument: Instrument, target: Body, epochs_t3: EpochArray, measurement_type: str = None, station_two: GroundStation = None, units=None, frame=None)#
Bases:
objectGroups together measurement data from different measurement models. Used by the active filter.
Generates a list of packaged data from a given measurement. At each epoch at which the filter has a valid measurement, provides access to its computed and observed value, residual, numerical value of the partial, and the standard deviation of the measurement.
- Parameters:
set_name (
str) – The name of the dataset.measurements (
list) – List with AWU, np.array, and lists of measurements data (e.g. observed, computed, residuals, partials, sigmas).names (
list[str]) – List of values in the measurement list (["computed", "observed", "residuals", "partials", "sigma"]).instrument (
Instrument) – Instrument used to generate these measurements (e.g. antenna, camera, etc.)target (
Body) – Target body of the measurement model.epochs_t3 (
EpochArray) – Epochs of the measurements.measurement_type (
str, optional) –The type of measurements. Can be given as:
range
range real
rangerate
doppler
doppler real
opnav
dor
Defaults to
None.station_two (
GroundStation, optional) – Optional Ground station object for three-way and DOR measurements. Defaults toNone.
Notes
The dataset is populated by
generate_measurement_dataset()and stores all quantities needed by a filter at each measurement epoch: computed value, observed value, prefit residual, measurement partials (\(H\) row), and measurement noise standard deviation (\(\sigma\)). Theoutlier_flagcolumn (value 0/1) allows downstream editing without removing data permanently.See also
scarabaeus.MeasurementAbstract base class for all measurement models.
- Attributes:
dataThe measurement data dictionary (computed, observed, residuals, partials, sigmas).
epochs_t3The reception epochs linked to the measurements.
frameFrame the measurements were generated in (a
Frameobject), orNone.instrumentThe instrument that generated the measurements.
measurement_typeThe measurement type string tag (e.g.
set_nameThe name of the dataset.
station_twoThe second ground station, for three-way and DOR measurement types.
targetTarget body of the measurement model.
unitsUnits of the measurement values (an
ArrayWUnitsunits object), orNone.
Methods
add_data(data, name)Adds data to an existing dataset.
flag_outliers_by_resid([mean_outlier, ...])Flag outliers in the MeasurementDataset based on residual values.
Remove from the MeasurementDataSet object the data and epochs_t3 associated to measurements with outlier_flag equal to 1.
- flag_outliers_by_resid(mean_outlier: float | None = None, sigma_outlier: float | None = None) None#
Flag outliers in the MeasurementDataset based on residual values.
Identifies measurements whose residuals fall outside the interval [mean - sigma, mean + sigma] and marks them as outliers.
- Parameters:
mean_outlier (
float, optional) – Center of the acceptable residual interval. If None, uses the mean of current residuals. Default is None.sigma_outlier (
float, optional) – Half-width of the acceptable residual interval. If None, uses 5 times the standard deviation of current residuals. Default is None.
- Returns:
Modifies self.data[‘outlier_flag’] in place.
- Return type:
- Raises:
Notes
By default (when both parameters are None), uses 5-sigma criterion
Outliers are flagged with value 1 in the ‘outlier_flag’ column
Existing outlier flags are preserved and combined with new detections
Examples
>>> # Flag outliers using default 5-sigma criterion >>> dataset.flag_outliers_by_resid()
>>> # Flag outliers using custom interval >>> dataset.flag_outliers_by_resid(mean_outlier=0.0, sigma_outlier=3.0)
- remove_outliers()#
Remove from the MeasurementDataSet object the data and epochs_t3 associated to measurements with outlier_flag equal to 1.
- Raises:
KeyError – If
outlier_flagkey is missing fromself.data.
- property data: list[str]#
The measurement data dictionary (computed, observed, residuals, partials, sigmas).
- property epochs_t3: EpochArray#
The reception epochs linked to the measurements.
- property frame#
Frame the measurements were generated in (a
Frameobject), orNone.
- property instrument: Instrument#
The instrument that generated the measurements.
- property measurement_type#
The measurement type string tag (e.g.
"range","doppler").
- property station_two: GroundStation#
The second ground station, for three-way and DOR measurement types.
- property units#
Units of the measurement values (an
ArrayWUnitsunits object), orNone.