From f4b0dd084c9bb99d24578f3760e3352b27b05fd3 Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 19 Jan 2021 13:23:27 +0100 Subject: [PATCH] add masked flag --- cara/montecarlo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index 897c9271..ac8448cb 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -28,12 +28,13 @@ def calculate_qr(viral_load: float, emission: float, diameter: float, mask_effic return viral_load * emission * volume * (1 - mask_efficiency) * breathing_rate / copies_per_quantum -def generate_qr_values(samples: int, expiratory_activity: int, qid: int = 100) -> np.ndarray: +def generate_qr_values(samples: int, expiratory_activity: int, masked: bool, qid: int = 100) -> np.ndarray: """ Randomly samples values for the quantum generation rate :param samples: The total number of samples to be generated :param expiratory_activity: An integer signifying the expiratory activity of the infected subject (1 = breathing, 2 = speaking, 3 = speaking loudly) + :param masked: True if infected subject is wearing a mask, False otherwise :param qid: The quantum infectious dose to be used in the calculations :return: A numpy array of length = samples, containing randomly generated qr-values """