Infection#
- class Infection(pars=None, *args, **kwargs)[source]#
Bases:
Disease
Base class for infectious diseases used in Starsim
This class contains specializations for infectious transmission (i.e., implements network-based transmission with directional beta values) and defines attributes that connectors operate on to capture co-infection
Attributes
Generally defined as an alias for infected, although these may differ in some diseases.
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
- property infectious#
Generally defined as an alias for infected, although these may differ in some diseases. Transmission comes from infectious people; prevalence estimates may include infected people who don’t transmit
- init_post()[source]#
Set initial values for states. This could involve passing in a full set of initial conditions, or using init_prev, or other. Note that this is different to initialization of the Arr objects i.e., creating their dynamic array, linking them to a People instance. That should have already taken place by the time this method is called.