ParticleDistribution
- class ParticleDistribution(**kwargs)[source]
 Bases:
objectParticle distribution object.
Helper class for managing arbitrary distributions of particles.
Methods
Adds a particle and weight to the distribution.
Clears the particle and weight lists.
Updates the weights to match the given list.
Attributes
Covariance of the particles.
Mean of the particles.
Number of particles.
Particles in the distribution.
Read only uncertainty of each particle.
Weights of the partilces.
- add_particle(p, w)[source]
 Adds a particle and weight to the distribution.
- Parameters:
 p (
distributions.Particleor list) – Particle to add or list of particles.w (float or list) – Weight of the particle or list of weights.
- Return type:
 None.
- update_weights(w_lst)[source]
 Updates the weights to match the given list.
Checks that the length of the weights matches the number of particles.
- property covariance
 Covariance of the particles.
- property mean
 Mean of the particles.
- property num_particles
 Number of particles.
- property particles
 Particles in the distribution.
Must be set by the
distributions.ParticleDistribution.add_particle()method.- Returns:
 Each element is a
distributions.Particleobject.- Return type:
 list
- property uncertainties
 Read only uncertainty of each particle.
- Returns:
 Each element is a N x N numpy array
- Return type:
 list
- property weights
 Weights of the partilces.
Must be set by the
distributions.ParticleDistribution.add_particle()ordistributions.ParticleDistribution.update_weights()methods.- Returns:
 Each element is a float representing the weight of the particle.
- Return type:
 list