From faaf1ed086068ee9f845fa289977bea0f9c08e11 Mon Sep 17 00:00:00 2001 From: Nicolas Mounet Date: Mon, 25 Apr 2022 17:32:30 +0200 Subject: [PATCH] In models, ExposureModel: multiplication by dilution factor done in a better place, in deposited_exposure_between_bounds method --- cara/models.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cara/models.py b/cara/models.py index 2c65c770..9d7898fd 100644 --- a/cara/models.py +++ b/cara/models.py @@ -1357,22 +1357,20 @@ class ExposureModel: # particle diameters (doing things in another order would # lead to wrong results for the probability of infection). this_deposited_exposure = (np.array(short_range_jet_exposure - * fdep).mean()/dilution + * fdep).mean() - np.array(short_range_lr_exposure * fdep).mean() - * self.concentration_model.infected.activity.exhalation_rate - /dilution) + * self.concentration_model.infected.activity.exhalation_rate) else: # in the case of a single diameter or no diameter defined, # one should not take any mean at this stage. - this_deposited_exposure = (short_range_jet_exposure - * fdep/dilution + this_deposited_exposure = (short_range_jet_exposure * fdep - short_range_lr_exposure * fdep - * self.concentration_model.infected.activity.exhalation_rate - /dilution) + * self.concentration_model.infected.activity.exhalation_rate) # multiply by the (diameter-independent) inhalation rate deposited_exposure += (this_deposited_exposure * - interaction.activity.inhalation_rate) + interaction.activity.inhalation_rate + /dilution) # then we multiply by diameter-independent quantities: viral load # and fraction of infected virions