From f82ab3a6d1f3f2160e1ff9f23f286db3a8df54da Mon Sep 17 00:00:00 2001 From: markus Date: Fri, 5 Feb 2021 10:49:38 +0100 Subject: [PATCH] implement english variant --- cara/montecarlo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index 60ce15e5..2742f9b3 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -140,6 +140,9 @@ class MCInfectedPopulation(MCPopulation): # The quantum infectious dose to be used in the calculations qid: int + # A bool indicating whether or not to use the viral loads corresponding to the english variant + english_variant: bool + viral_load: typing.Optional[float] = None @functools.lru_cache() @@ -189,6 +192,8 @@ class MCInfectedPopulation(MCPopulation): :return: A numpy array of length = samples, containing randomly generated qr-values """ viral_loads = self._generate_viral_loads() + if self.english_variant: + viral_loads += np.log10(11.5) emission_concentration = self._calculate_emission_concentration()