Clutter Models
 class stonesoup.models.clutter.ClutterModel(clutter_rate: float = 1.0, distribution: ~collections.abc.Callable = <bound method Generator.uniform of Generator(PCG64)>, dist_params: tuple = ((200, 200), (200, 200)), seed: int  ~numpy.random.mtrand.RandomState  None = None)[source]

A model for generating sensor clutter (false alarms) according to a specified distribution in the state space relative to the sensor’s position.
Note
Instances of this class do not hold information about the measurement space until immediately before they are called to function. As such, the same
ClutterModel
object could be used with multiple differentMeasurementModel
as long as they operate in the same state space. Parameters:
clutter_rate (
float
, optional) – The average number of clutter points per time step. The actual number is Poisson distributeddistribution (
collections.abc.Callable
, optional) – A function which represents the distribution of the clutter over the measurement space. The function should return a single value (ie, do not use multivariate distributions).dist_params (
tuple
, optional) – The required parameters for the clutter distribution function. The length of the list must be equal to the number of state dimensions and should be defined for use in Cartesian space.The default defines the space for a uniform distribution in 2D. The call np.array([self.distribution(*arg) for arg in self.dist_params]) must return a numpy array of length equal to the number of dimensions.seed (
Union[int, numpy.random.mtrand.RandomState, NoneType]
, optional) – Seed or state for random number generation. If defined as an integer, it will be used to create a numpy RandomState. Or it can be defined directly as a RandomState (useful if you want to pass one of the random state’s functions as thedistribution
).
 clutter_rate: float
The average number of clutter points per time step. The actual number is Poisson distributed
 distribution: Callable
A function which represents the distribution of the clutter over the measurement space. The function should return a single value (ie, do not use multivariate distributions).
 dist_params: tuple
The required parameters for the clutter distribution function. The length of the list must be equal to the number of state dimensions and should be defined for use in Cartesian space.The default defines the space for a uniform distribution in 2D. The call np.array([self.distribution(*arg) for arg in self.dist_params]) must return a numpy array of length equal to the number of dimensions.
 seed: int  RandomState  None
Seed or state for random number generation. If defined as an integer, it will be used to create a numpy RandomState. Or it can be defined directly as a RandomState (useful if you want to pass one of the random state’s functions as the
distribution
).
 function(ground_truths: set[GroundTruthState], **kwargs) set[Clutter] [source]
Use the defined distribution and parameters to create simulated clutter for the current time step. Return this clutter to the calling sensor so that it can be added to the measurements.
 Parameters:
ground_truths (a set of
GroundTruthState
) – The truth states which exist at this time step. Returns:
The simulated clutter.
 Return type:
set of
Clutter
 property ndim: int
Return the number of measurement dimensions or, if a measurement model has not yet been assigned, the number of state dimensions.
 jacobian(state, **kwargs)
Model jacobian matrix \(H_{jac}\)
 Parameters:
state (
State
) – An input state Returns:
The model jacobian matrix evaluated around the given state vector.
 Return type:
numpy.ndarray
of shape (ndim_meas
,ndim_state
)
 logpdf(state1: State, state2: State, **kwargs) float  ndarray
Model log pdf/likelihood evaluation function
Evaluates the pdf/likelihood of
state1
, given the statestate2
which is passed tofunction()
.
 rvs(num_samples: int = 1, **kwargs) StateVector  StateVectors [source]
Must be implemented to properly inherit the parent Model.