Deleters¶
-
class
stonesoup.deleter.base.Deleter(delete_last_pred: bool = False)[source]¶ Bases:
stonesoup.base.BaseDeleter 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.
-
delete_tracks(tracks: Set[Track], **kwargs) → Set[stonesoup.types.track.Track][source]¶ Generic/Base track deletion method.
Iterates through all tracks in a given list and calls
check_for_deletion()to determine which tracks should be deleted and which should survive.
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:
stonesoup.deleter.base.DeleterTrack 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.
-
delete_tracks(tracks: Set[Track], **kwargs) → Set[stonesoup.types.track.Track]¶ Generic/Base track deletion method.
Iterates through all tracks in a given list and calls
check_for_deletion()to determine which tracks should be deleted and which should survive.
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:
stonesoup.deleter.base.DeleterUpdate Time based deleter
Identify tracks for deletion which an
Updatehas 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
-
delete_tracks(tracks: Set[Track], **kwargs) → Set[stonesoup.types.track.Track]¶ Generic/Base track deletion method.
Iterates through all tracks in a given list and calls
check_for_deletion()to determine which tracks should be deleted and which should survive.
-
class
stonesoup.deleter.time.UpdateTimeDeleter(time_since_update: datetime.timedelta, delete_last_pred: bool = False)[source]¶ Bases:
stonesoup.deleter.base.DeleterUpdate Time based deleter
Identify tracks for deletion which time of last
Updatewith 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.
-
time_since_update: datetime.timedelta¶ Maximum time since last update
-
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
True if track has an
Updatewith measurements within time; False otherwise.- Return type
-
delete_tracks(tracks: Set[Track], **kwargs) → Set[stonesoup.types.track.Track]¶ Generic/Base track deletion method.
Iterates through all tracks in a given list and calls
check_for_deletion()to determine which tracks should be deleted and which should survive.
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:
stonesoup.deleter.base.DeleterTrack deleter composed of multiple deleters.
If
intersectis 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[stonesoup.deleter.base.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.
-
delete_tracks(tracks: Set[Track], **kwargs) → Set[stonesoup.types.track.Track]¶ Generic/Base track deletion method.
Iterates through all tracks in a given list and calls
check_for_deletion()to determine which tracks should be deleted and which should survive.