precompute_waning#

class precompute_waning(t, pars=None)[source]#

Process functional form and parameters into values:

  • ‘exp_decay’ : exponential decay. Parameters should be init_val and half_life (half_life can be None/nan)

  • ‘linear_decay’: linear decay

A custom function can also be supplied.

Parameters:
  • length (float) – length of array to return, i.e., for how long waning is calculated

  • pars (dict) – passed to individual immunity functions

Returns:

array of length ‘length’ of values