Merge branch 'feature/masks_efficiency' into 'master'

Inward efficiency of masks

See merge request cara/cara!250
This commit is contained in:
Philip Elson 2021-09-02 17:15:06 +02:00
commit 0414e15e4b
4 changed files with 31 additions and 3 deletions

View file

@ -11,7 +11,7 @@ from cara import data
import cara.data.weather
import cara.monte_carlo as mc
from .. import calculator
from cara.monte_carlo.data import activity_distributions, virus_distributions
from cara.monte_carlo.data import activity_distributions, virus_distributions, mask_distributions
LOG = logging.getLogger(__name__)
@ -359,7 +359,10 @@ class FormData:
def mask(self) -> models.Mask:
# Initializes the mask type if mask wearing is "continuous", otherwise instantiates the mask attribute as
# the "No mask"-mask
mask = models.Mask.types[self.mask_type if self.mask_wearing_option == "mask_on" else 'No mask']
if self.mask_wearing_option == 'mask_on':
mask = mask_distributions[self.mask_type]
else:
mask = models.Mask.types['No mask']
return mask
def infected_population(self) -> mc.InfectedPopulation:

View file

@ -71,3 +71,6 @@ We wish to thank CERNs HSE Unit, Beams Department, Experimental Physics Depar
[54] Leung, N.H.L et al. Respiratory virus shedding in exhaled breath and efficacy of face masks. Nat Med (2020). 10.1038/s41591-020-0843-2.<br>
[55] Asadi, S., Cappa, C.D., Barreda, S. et al. Efficacy of masks and face coverings in controlling outward aerosol particle emission from expiratory activities. Sci Rep 10, 15665 (2020). https://doi.org/10.1038/s41598-020-72798-7.<br>
[56] Endo A, Abbott S et al. Estimating the overdispersion in COVID-19 transmission using outbreak sizes outside China [version 3; peer review: 2 approved]. Wellcome Open Res 2020, 5:67. doi:10.12688/wellcomeopenres.15842.3.<br>
[57] Jin Pan, Charbel Harb, Weinan Leng & Linsey C. Marr (2021) Inward and outward effectiveness of cloth masks, a surgical mask, and a face shield, Aerosol Science and Technology, 55:6, 718-733, doi: 10.1080/02786826.2021.1890687.<br>
[58] C. Makison Booth, M. Clayton, B. Crook, J.M. Gawn, Effectiveness of surgical masks against influenza bioaerosols, Journal of Hospital Infection, Volume 84, Issue 1, 2013, Pages 22-26, https://doi.org/10.1016/j.jhin.2013.02.007.<br>
[59] Riediker, M., Monn, C. (2021). Simulation of SARS-CoV-2 Aerosol Emissions in the Infected Population and Resulting Airborne Exposures in Different Indoor Scenarios. Aerosol Air Qual. Res. 21, 200531. https://doi.org/10.4209/aaqr.2020.08.0531.<br>

View file

@ -1,7 +1,7 @@
import numpy as np
import cara.monte_carlo as mc
from cara.monte_carlo.sampleable import Normal,LogNormal,LogCustomKernel
from cara.monte_carlo.sampleable import Normal,LogNormal,LogCustomKernel, Uniform
# From CERN-OPEN-2021-04 and refererences therein
@ -58,3 +58,13 @@ virus_distributions = {
infectious_dose=60/1.6,
),
}
# From:
# https://doi.org/10.1080/02786826.2021.1890687
# https://doi.org/10.1016/j.jhin.2013.02.007
# https://doi.org/10.4209/aaqr.2020.08.0531
mask_distributions = {
'Type I': mc.Mask(Uniform(0.25, 0.80)),
'FFP2': mc.Mask(Uniform(0.83, 0.91)),
}

View file

@ -28,6 +28,18 @@ class Normal(SampleableDistribution):
return np.random.normal(self.mean, self.standard_deviation, size=size)
class Uniform(SampleableDistribution):
"""
Defines a continuous uniform distribution
"""
def __init__(self, low: float, high: float):
self.low = low
self.high = high
def generate_samples(self, size: int) -> float_array_size_n:
return np.random.uniform(self.low, self.high, size=size)
class LogNormal(SampleableDistribution):
"""
Defines a lognormal distribution (i.e. Gaussian distribution vs. the