lifeof_recorder#

class lifeof_recorder(**kwargs)[source]#

Bases: Analyzer

Analyzer records sexual and reproductive history, and contraceptions females, plus age and living status for all timesteps. Made for debugging purposes.

Parameters:
  • args (list) – additional timestep(s)

  • kwargs (dict) – passed to Analyzer()

Attributes

now

Shortcut to self.t.now()

states

Return a flat list of all states

statesdict

Return a flat dictionary (objdict) of all states

ti

Get the current module timestep

timevec

Shortcut to self.t.timevec

Methods

step()[source]#

Apply snapshot at each timestep listed in timesteps and save result at snapshot[str(timestep)]

finalize(sim=None)[source]#

Process data in snapshots so we can plot it easily

plot(index=0, fig_args=None, pl_args=None)[source]#

Plots time series of each state as a line graph :type index: :param index: index of the female individual, must be less the analyzer’s max_pop_size