From db37b58403085b729419ebc68a6e046c25e3f4a7 Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 2 Feb 2021 13:02:02 +0100 Subject: [PATCH] add specific class for buonanno comparison --- cara/montecarlo.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index 318222e3..58b0932a 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -233,6 +233,27 @@ class MCConcentrationModel: return concentration_limit * (1 - fac) + concentration_at_last_state_change * fac +@dataclass(frozen=True) +class BuonannoSpecificInfectedPopulation: + #: The virus with which the population is infected. + virus: MCVirus + + # The total number of samples to be generated + samples: int + + presence: models.Interval = models.SpecificInterval(((0, 2), )) + + constant_qr: float = 1000 + + @functools.lru_cache() + def emission_rate(self, time) -> float: + """ + The emission rate of the entire population. + + """ + return self.constant_qr + + @dataclass(frozen=True) class MCExposureModel: #: The virus concentration model which this exposure model should consider.