From f518a893d506058968c1cd722a6ea5e7a04fbc05 Mon Sep 17 00:00:00 2001 From: jdevine Date: Mon, 9 May 2022 14:04:27 +0200 Subject: [PATCH] Corrected handling of min-1/hr-1 half life Changed half life 'limit' value to 6.43 (as paper model, used when formula gives negative values). --- cara/models.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cara/models.py b/cara/models.py index 06f45d25..faee2e3f 100644 --- a/cara/models.py +++ b/cara/models.py @@ -459,11 +459,14 @@ class SARSCoV2(Virus): CERN-OPEN-2021-004, DOI: 10.17181/CERN.1GDQ.5Y75) """ # Updated to use the formula from Dabish et al. with correction https://doi.org/10.1080/02786826.2020.1829536 - # with a minimum at hl = 1.1. Note that humidity is in percentage and inside_temp in °C. - return np.maximum(1.1, (0.693/((0.16030 + 0.04018*(((inside_temp-273.15)-20.615)/10.585) + # with a maximum at hl = 6.43. Note that humidity is in percentage and inside_temp in °C. + hl_calc = ((0.693/((0.16030 + 0.04018*(((inside_temp-273.15)-20.615)/10.585) +0.02176*(((humidity*100)-45.235)/28.665) -0.14369 - -0.02636*((inside_temp-273.15)-20.615)/10.585)))) + -0.02636*((inside_temp-273.15)-20.615)/10.585)))/60) + if (hl_calc <= 0): + hl_calc = 6.43 + return hl_calc Virus.types = {