Removing infectious dose in emission rate when using known_individual_emission_rate
This commit is contained in:
parent
d1ec990255
commit
85f0f1708e
2 changed files with 14 additions and 9 deletions
|
|
@ -693,9 +693,8 @@ class _PopulationWithVirus(Population):
|
|||
#: 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))
|
||||
#: Optionally, this provides directly the emission rate of a single
|
||||
# individual, in virions / h.
|
||||
# This effectively overrides the "expiration" parameter.
|
||||
known_individual_emission_rate: float = np.nan
|
||||
|
||||
|
|
|
|||
|
|
@ -22,14 +22,20 @@ def test_model_from_dict_invalid(baseline_form_data):
|
|||
model_generator.FormData.from_dict(baseline_form_data)
|
||||
|
||||
|
||||
def test_blend_expiration():
|
||||
@pytest.mark.parametrize(
|
||||
["mask_type"],
|
||||
[
|
||||
["No mask"],
|
||||
["Type I"],
|
||||
]
|
||||
)
|
||||
def test_blend_expiration(mask_type):
|
||||
blend = {'Breathing': 2, 'Talking': 1}
|
||||
r = model_generator.build_expiration(blend)
|
||||
mask = models.Mask.types['Type I']
|
||||
expected = models.Expiration(
|
||||
(0.13466666666666668, 0.02866666666666667, 0.004333333333333334),
|
||||
2.5)
|
||||
npt.assert_almost_equal(r.aerosols(mask), expected.aerosols(mask))
|
||||
mask = models.Mask.types[mask_type]
|
||||
expected = (models.Expiration.types['Breathing'].aerosols(mask)*2/3. +
|
||||
models.Expiration.types['Talking'].aerosols(mask)/3.)
|
||||
npt.assert_allclose(r.aerosols(mask), expected)
|
||||
|
||||
|
||||
def test_ventilation_slidingwindow(baseline_form: model_generator.FormData):
|
||||
|
|
|
|||
Loading…
Reference in a new issue