Remove suprespreading event from the expiration types; replace by an optional parameter to fix directly the emission rate; updates the corresponding tests
This commit is contained in:
parent
46465c499d
commit
d1ec990255
3 changed files with 22 additions and 8 deletions
|
|
@ -630,12 +630,14 @@ class MultipleExpiration(_ExpirationBase):
|
|||
]).sum(axis=0)
|
||||
|
||||
|
||||
# Typical expirations. The aerosol diameter given is an equivalent
|
||||
# diameter, chosen in such a way that the aerosol volume is
|
||||
# the same as the total aerosol volume given by the full BLO model.
|
||||
_ExpirationBase.types = {
|
||||
'Breathing': Expiration((1., 0., 0.), 1.3844),
|
||||
'Talking': Expiration((1., 1., 1.), 5.8925),
|
||||
'Shouting': Expiration((1., 5., 5.), 10.0411),
|
||||
'Singing': Expiration((1., 5., 5.), 10.0411),
|
||||
'Superspreading event': Expiration((np.inf, 0., 0.), 10.0411),
|
||||
'Breathing': Expiration((1., 0., 0.)),
|
||||
'Talking': Expiration((1., 1., 1.)),
|
||||
'Shouting': Expiration((1., 5., 5.)),
|
||||
'Singing': Expiration((1., 5., 5.)),
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -688,6 +690,15 @@ class _PopulationWithVirus(Population):
|
|||
#: The virus with which the population is infected.
|
||||
virus: Virus
|
||||
|
||||
#: The type of expiration that is being emitted whilst doing the activity.
|
||||
expiration: _ExpirationBase
|
||||
|
||||
#: Optionally, this provides directly the emission rate of a single individual,
|
||||
# in units of virions * virus.infectious_dose / h (i.e. it is
|
||||
# multiplied by the virus infectious dose, to get virions / h))
|
||||
# This effectively overrides the "expiration" parameter.
|
||||
known_individual_emission_rate: float = np.nan
|
||||
|
||||
@method_cache
|
||||
def emission_rate_when_present(self) -> _VectorisedFloat:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ def test_blend_expiration():
|
|||
r = model_generator.build_expiration(blend)
|
||||
mask = models.Mask.types['Type I']
|
||||
expected = models.Expiration(
|
||||
(0.13466666666666668, 0.02866666666666667, 0.004333333333333334, 0.005)
|
||||
)
|
||||
(0.13466666666666668, 0.02866666666666667, 0.004333333333333334),
|
||||
2.5)
|
||||
npt.assert_almost_equal(r.aerosols(mask), expected.aerosols(mask))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -218,7 +218,10 @@ def skagit_chorale_mc():
|
|||
presence=mc.SpecificInterval(((0., 2.5),)),
|
||||
mask=models.Mask.types["No mask"],
|
||||
activity=activity_distributions['Light activity'],
|
||||
expiration=models.Expiration((5., 5., 5.)),
|
||||
expiration=models.Expiration((5., 5., 5.), 10.0761),
|
||||
# The aerosol diameter given (10.0761 microns) is an equivalent
|
||||
# diameter, chosen in such a way that the aerosol volume is
|
||||
# the same as the total aerosol volume given by the full BLO model.
|
||||
),
|
||||
)
|
||||
return mc.ExposureModel(
|
||||
|
|
|
|||
Loading…
Reference in a new issue