Skip to content

laser.measles.components.base_tracker_population

laser.measles.components.base_tracker_population

laser.measles.components.base_tracker_population.BasePopulationTracker(model, params=None)

Bases: BasePhase

Tracks the population size of each patch at each time tick.

After model.run(), the recorded time series is available as a numpy array on the population_tracker attribute:

1
2
3
``tracker.population_tracker``  shape ``(n_patches, n_ticks)``, the
total agent count per patch at each tick. Sum across the patch axis
(``axis=0``) to get the global population time series.

Subclasses for ABM, biweekly, and compartmental models share this layout; see their docstrings for end-to-end examples that include the post-run access pattern.