Added the new distribution for the viral_load_in_sputum. Tests were updated

This commit is contained in:
Luis Aleixo 2022-05-31 17:44:12 +02:00
parent 4f37b2db8d
commit 59e24e0f47
3 changed files with 16 additions and 16 deletions

View file

@ -110,7 +110,7 @@ viral_load = np.linspace(weibull_min.ppf(0.01, c=3.47, scale=7.01),
weibull_min.ppf(0.99, c=3.47, scale=7.01), 30)
frequencies_pdf = weibull_min.pdf(viral_load, c=3.47, scale=7.01)
covid_overal_vl_data = LogCustom(bounds=(2, 10),
function=lambda d: np.interp(d, viral_load, frequencies_pdf, right=0., left=0.),
function=lambda d: np.interp(d, viral_load, frequencies_pdf, left=0., right=0.),
max_function=0.2)
@ -156,7 +156,7 @@ virus_distributions = {
transmissibility_factor=0.51,
),
'SARS_CoV_2_OMICRON': mc.SARSCoV2(
viral_load_in_sputum=symptomatic_vl_frequencies,
viral_load_in_sputum=covid_overal_vl_data,
infectious_dose=infectious_dose_distribution,
viable_to_RNA_ratio=viable_to_RNA_ratio_distribution,
transmissibility_factor=0.2,

View file

@ -308,17 +308,17 @@ def waiting_room_mc():
)
@retry()
@retry(tries=10)
@pytest.mark.parametrize(
"mc_model, expected_pi, expected_new_cases, expected_dose, expected_ER",
[
["shared_office_mc", 5.55, 0.17, 2.699, 809],
["classroom_mc", 9.58, 1.82, 9.034, 5624],
["ski_cabin_mc", 16.0, 0.47, 17.315, 7966],
["shared_office_mc", 5.38, 0.16, 3.350, 1056],
["classroom_mc", 8.21, 1.56, 11.356, 7416],
["ski_cabin_mc", 12.92, 0.39, 21.796, 10231],
["skagit_chorale_mc",61.01, 36.53, 84.730, 190422],
["bus_ride_mc", 10.59, 7.06, 6.65, 5419],
["gym_mc", 0.43, 0.12, 0.197, 1145],
["waiting_room_mc", 1.34, 0.18, 0.670, 737],
["bus_ride_mc", 10.59, 7.06, 6.650, 5419],
["gym_mc", 0.52, 0.14, 0.249, 1450],
["waiting_room_mc", 1.53, 0.21, 0.844, 929],
]
)
def test_report_models(mc_model, expected_pi, expected_new_cases,
@ -339,10 +339,10 @@ def test_report_models(mc_model, expected_pi, expected_new_cases,
@pytest.mark.parametrize(
"mask_type, month, expected_pi, expected_dose, expected_ER",
[
["No mask", "Jul", 8.46, 8.113, 809],
["Type I", "Jul", 1.44, 0.727, 149],
["FFP2", "Jul", 0.43, 0.197, 149],
["Type I", "Feb", 0.54, 0.253, 149],
["No mask", "Jul", 7.689, 10.050, 1034.435],
["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],
],
)
def test_small_shared_office_Geneva(mask_type, month, expected_pi,

View file

@ -34,11 +34,11 @@ def test_activity_distributions(distribution, mean, std):
# - with a refined precision on the values
@pytest.mark.parametrize(
"distribution, mean, std",[
['SARS_CoV_2', 6.59, 1.74],
['SARS_CoV_2', 6.22, 1.80],
['SARS_CoV_2_ALPHA', 6.59, 1.74],
['SARS_CoV_2_ALPHA', 6.22, 1.80],
['SARS_CoV_2_GAMMA', 6.59, 1.74],
['SARS_CoV_2_GAMMA', 6.22, 1.80],
]
)
def test_viral_load_logdistribution(distribution, mean, std):