Merge branch 'feature/cloth_mask' into 'master'
New mask type See merge request cara/caimira!394
This commit is contained in:
commit
49ed8d0bfb
7 changed files with 26 additions and 3 deletions
|
|
@ -807,7 +807,7 @@ def baseline_raw_form_data() -> typing.Dict[str, typing.Union[str, float]]:
|
|||
|
||||
ACTIVITY_TYPES = {'office', 'smallmeeting', 'largemeeting', 'training', 'training_attendee', 'callcentre', 'controlroom-day', 'controlroom-night', 'library', 'workshop', 'lab', 'gym'}
|
||||
MECHANICAL_VENTILATION_TYPES = {'mech_type_air_changes', 'mech_type_air_supply', 'not-applicable'}
|
||||
MASK_TYPES = {'Type I', 'FFP2'}
|
||||
MASK_TYPES = {'Type I', 'FFP2', 'Cloth'}
|
||||
MASK_WEARING_OPTIONS = {'mask_on', 'mask_off'}
|
||||
VENTILATION_TYPES = {'natural_ventilation', 'mechanical_ventilation', 'no_ventilation'}
|
||||
VIRUS_TYPES = {'SARS_CoV_2', 'SARS_CoV_2_ALPHA', 'SARS_CoV_2_BETA','SARS_CoV_2_GAMMA', 'SARS_CoV_2_DELTA', 'SARS_CoV_2_OMICRON'}
|
||||
|
|
|
|||
BIN
caimira/apps/static/images/masks/cloth.png
Normal file
BIN
caimira/apps/static/images/masks/cloth.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
|
|
@ -295,6 +295,13 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" id="mask_type_cloth" name="mask_type" value="Cloth" onclick="require_fields(this)">
|
||||
<label for="mask_type_cloth">
|
||||
Cloth
|
||||
<img class="mask_icons" src="/static/images/masks/cloth.png">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr width="80%">
|
||||
|
||||
|
|
|
|||
|
|
@ -526,6 +526,9 @@ class Mask:
|
|||
#: Filtration efficiency of masks when inhaling.
|
||||
η_inhale: _VectorisedFloat
|
||||
|
||||
#: Filtration efficiency of masks when exhaling.
|
||||
η_exhale: typing.Union[None, _VectorisedFloat] = None
|
||||
|
||||
#: Global factor applied to filtration efficiency of masks when exhaling.
|
||||
factor_exhale: float = 1.
|
||||
|
||||
|
|
@ -541,6 +544,10 @@ class Mask:
|
|||
the leakage through the sides.
|
||||
Diameter is in microns.
|
||||
"""
|
||||
if self.η_exhale is not None:
|
||||
# When η_exhale is specified, return it directly
|
||||
return self.η_exhale
|
||||
|
||||
d = np.array(diameter)
|
||||
intermediate_range1 = np.bitwise_and(0.5 <= d, d < 0.94614)
|
||||
intermediate_range2 = np.bitwise_and(0.94614 <= d, d < 3.)
|
||||
|
|
@ -570,6 +577,10 @@ Mask.types = {
|
|||
'FFP2': Mask(
|
||||
η_inhale=0.865, # (94% penetration efficiency + 8% max inward leakage -> EN 149)
|
||||
),
|
||||
'Cloth': Mask( # https://doi.org/10.1080/02786826.2021.1890687
|
||||
η_inhale=0.225,
|
||||
η_exhale=0.35,
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -167,9 +167,11 @@ virus_distributions = {
|
|||
# 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
|
||||
# https://doi.org/10.1080/02786826.2021.1890687
|
||||
mask_distributions = {
|
||||
'Type I': mc.Mask(Uniform(0.25, 0.80)),
|
||||
'FFP2': mc.Mask(Uniform(0.83, 0.91)),
|
||||
'Type I': mc.Mask(η_inhale=Uniform(0.25, 0.80)),
|
||||
'FFP2': mc.Mask(η_inhale=Uniform(0.83, 0.91)),
|
||||
'Cloth': mc.Mask(η_inhale=Uniform(0.05, 0.40), η_exhale=Uniform(0.20, 0.50)),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ def test_model_from_dict_invalid(baseline_form_data):
|
|||
[
|
||||
["No mask"],
|
||||
["Type I"],
|
||||
["Cloth"],
|
||||
]
|
||||
)
|
||||
def test_blend_expiration(mask_type):
|
||||
|
|
|
|||
|
|
@ -347,6 +347,8 @@ def test_report_models(mc_model, expected_pi, expected_new_cases,
|
|||
["Type I", "Jul", 1.663, 0.938, 193.52],
|
||||
["FFP2", "Jul", 0.523, 0.253, 193.52],
|
||||
["Type I", "Feb", 0.659, 0.325, 193.52],
|
||||
["Cloth", "Feb", 2.653, 1.741, 673.10],
|
||||
["Cloth", "Jul", 5.322, 5.064, 673.10],
|
||||
],
|
||||
)
|
||||
def test_small_shared_office_Geneva(mask_type, month, expected_pi,
|
||||
|
|
|
|||
Loading…
Reference in a new issue