Deleters
- class stonesoup.deleter.base.Deleter(delete_last_pred: bool = False)[source]
Bases:
Base
Deleter base class.
Proposes tracks for deletion.
- Parameters:
delete_last_pred (
bool
, optional) – Remove the state that caused a track to be deleted if it is a prediction.
- abstract check_for_deletion(track: Track, **kwargs) bool [source]
Check if a given track should be deleted.
Error Based
Contains collection of error based deleters
- class stonesoup.deleter.error.CovarianceBasedDeleter(covar_trace_thresh: float, delete_last_pred: bool = False, mapping: Sequence[int] = None)[source]
Bases:
Deleter
Track deleter based on covariance matrix size.
Deletes tracks whose state covariance matrix (more specifically its trace) exceeds a given threshold.
- Parameters:
covar_trace_thresh (
float
) – Covariance matrix trace thresholddelete_last_pred (
bool
, optional) – Remove the state that caused a track to be deleted if it is a prediction.mapping (
Sequence[int]
, optional) – Track state vector indices whose corresponding covariances’ sum is to be considered. Defaults toNone, whereby the entire track covariance trace is considered.
- mapping: Sequence[int]
Track state vector indices whose corresponding covariances’ sum is to be considered. Defaults toNone, whereby the entire track covariance trace is considered.
- check_for_deletion(track, **kwargs)[source]
Check if a given track should be deleted
A track is flagged for deletion if the trace of its state covariance matrix is higher than
covar_trace_thresh
.
Time Based
Contains collection of time based deleters
- class stonesoup.deleter.time.UpdateTimeStepsDeleter(time_steps_since_update: int, delete_last_pred: bool = False)[source]
Bases:
Deleter
Update Time based deleter
Identify tracks for deletion which an
Update
has occurred in lasttime_steps_since_update
.- Parameters:
time_steps_since_update (
int
) – Maximum time steps since last updatedelete_last_pred (
bool
, optional) – Remove the state that caused a track to be deleted if it is a prediction.
- check_for_deletion(track, **kwargs)[source]
Delete track without update with measurements within time steps
- class stonesoup.deleter.time.UpdateTimeDeleter(time_since_update: timedelta, delete_last_pred: bool = False)[source]
Bases:
Deleter
Update Time based deleter
Identify tracks for deletion which time of last
Update
with measurements is greater thantime_since_update
.- Parameters:
time_since_update (
datetime.timedelta
) – Maximum time since last updatedelete_last_pred (
bool
, optional) – Remove the state that caused a track to be deleted if it is a prediction.
- check_for_deletion(track, timestamp=None, **kwargs)[source]
Delete track based on time of last update with measurements
- Parameters:
track (Track) – Track to check for deletion
timestamp (datetime.datetime, optional) – Timestamp to calculate deletion time from. Default None, where the track’s latest timestamp will be used.
- Returns:
False if track has an
Update
with measurements within time; True otherwise.- Return type:
Multi
Contains deleters which use a composite of deleters to decide whether a track is to be deleted
- class stonesoup.deleter.multi.CompositeDeleter(deleters: Collection[Deleter], delete_last_pred: bool = False, intersect: bool = True)[source]
Bases:
Deleter
Track deleter composed of multiple deleters.
If
intersect
is True, deletes tracks if they satisfy the deletion conditions of each deleter listed indeleters
. Otherwise deletes tracks if they satisfy the conditions of at least one deleter listed.- Parameters:
deleters (
Collection[Deleter]
) – List of deleters to be applied to the trackdelete_last_pred (
bool
, optional) – Remove the state that caused a track to be deleted if it is a prediction.intersect (
bool
, optional) – Boolean that determines whether the composite deleter will intersect or unify deletion results. Default is True, applying an intersection.
- deleters: Collection[Deleter]
List of deleters to be applied to the track
- intersect: bool
Boolean that determines whether the composite deleter will intersect or unify deletion results. Default is True, applying an intersection.