Open edwenger opened 3 weeks ago
Mostly possible already with this performance-inspired modification: https://github.com/starsimhub/starsim/commit/9cc1d7c9f1b4e29d80385a9cc8c89227b65619e5
Would still need to pass in self.pars
(possibly upstream of staticmethod call in ss.Infection.infect()
?) to be able to use the instance-level parameters that shape the dose-response curve, though.
pars = self.pars
alpha = pars.p_transmit['alpha']
gamma = pars.p_transmit['gamma']
prob_infection = (1 - (1 + dose / pars.sabin_scale_parameter) ** (-alpha * (rel_sus_target) ** -gamma)) * pars.strain_take_modifier
Like, for example, here: https://github.com/starsimhub/starsim/blob/v2.0.0/starsim/diseases/hiv.py#L40