5.17. pypfilt.state

pypfilt.state.history_matrix(ctx, sim_time)

Allocate a particle history matrix of sufficient size to store an entire particle filter simulation.

Parameters:
  • params (dict) – The simulation parameters.
  • sim_time (Time) – The simulation period.
Returns:

A particle history matrix.

Return type:

numpy.ndarray

pypfilt.state.earlier_states(hist, ix, steps)

Return the particle states at a previous time-step, ordered with respect to their current arrangement.

Parameters:
  • hist – The particle history matrix.
  • ix – The current time-step index.
  • steps – The number of steps back in time.