From d096855becbf1ebede08eaf1968020efa22e2648 Mon Sep 17 00:00:00 2001 From: markus Date: Mon, 18 Jan 2021 14:57:34 +0100 Subject: [PATCH] add calculate_qr --- cara/montecarlo.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index e69de29b..34e59cc2 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -0,0 +1,11 @@ +import cara.models +import numpy as np + + +def calculate_qr(viral_load: float, emission_concentration: float, diameter: float, mask_efficiency: float, + copies_per_quantum: float, breathing_rate: float = 1) -> float: + """ + Calculates the quantum generation rate given a set of parameters. + """ + volume = 4 * np.pi * (diameter / 2) ** 3 / 3 + return viral_load * emission_concentration * volume * (1 - mask_efficiency) * breathing_rate / copies_per_quantum