change vl_crit to vl_95
This commit is contained in:
parent
25b5a16668
commit
7fee476ea6
2 changed files with 10 additions and 9 deletions
|
|
@ -1,8 +1,8 @@
|
|||
from cara.montecarlo import *
|
||||
from cara.model_scenarios import *
|
||||
|
||||
classroom_model.infection_probability()
|
||||
compare_concentration_curves([classroom_model, classroom_model_with_hepa], ['Just window', 'Window and HEPA'])
|
||||
#classroom_model.infection_probability()
|
||||
#compare_concentration_curves([classroom_model, classroom_model_with_hepa], ['Just window', 'Window and HEPA'])
|
||||
|
||||
#print(np.mean(chorale_model.infection_probability()))
|
||||
#print(np.mean(chorale_model.infection_probability())+np.std(chorale_model.infection_probability()))
|
||||
|
|
@ -13,11 +13,11 @@ compare_concentration_curves([classroom_model, classroom_model_with_hepa], ['Jus
|
|||
|
||||
|
||||
# #print(np.mean(classroom_model_with_hepa.infection_probability()))
|
||||
# composite_plot_pi_vs_viral_load([shared_office_worst_model[1], shared_office_model[1],shared_office_better_model[1]],
|
||||
# labels=['No mask &\nwindows closed', 'Baseline', 'Baseline +\nHEPA filter'],
|
||||
# colors=['tomato', '#1f77b4', 'limegreen'],
|
||||
# title='$P(I|qID)$ vs $vl$ - Shared office scenario',
|
||||
# vl_points=200)
|
||||
composite_plot_pi_vs_viral_load([shared_office_worst_model[1], shared_office_model[1],shared_office_better_model[1]],
|
||||
labels=['No mask &\nwindows closed', 'Baseline', 'Baseline +\nHEPA filter'],
|
||||
colors=['tomato', '#1f77b4', 'limegreen'],
|
||||
title='$P(I|qID)$ vs $vl$ - Shared office scenario',
|
||||
vl_points=200)
|
||||
#plot_pi_vs_viral_load([shared_office_model[1]], labels=['Baseline, qID=60', 'HEPA, qID=60', 'No mask + windows closed, qID=60'],title='$P(I|qID)$ - Shared office scenario')
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -610,7 +610,8 @@ def plot_pi_vs_viral_load(baselines: typing.Union[MCExposureModel, typing.List[M
|
|||
|
||||
def composite_plot_pi_vs_viral_load(baselines: typing.List[MCExposureModel], labels: typing.List[str],
|
||||
colors: typing.List[str], samples_per_vl: int = 2000, vl_points: int = 200,
|
||||
title: str = 'Probability of infection vs viral load', show_lines: bool = True) -> None:
|
||||
title: str = 'Probability of infection vs viral load', show_lines: bool = True,
|
||||
show_vl_crit: bool = True) -> None:
|
||||
viral_loads = np.linspace(1, 12, vl_points)
|
||||
lines, lowers, uppers = [], [], []
|
||||
for baseline in baselines:
|
||||
|
|
@ -695,7 +696,7 @@ def composite_plot_pi_vs_viral_load(baselines: typing.List[MCExposureModel], lab
|
|||
break
|
||||
|
||||
for i, (crit, color) in enumerate(zip(crits, colors)):
|
||||
axs[0, 0].text(2.5, 0.4 - i * 0.1, f'x $vl_{"{crit2}"}=' + '10^{' + str(np.round(crits[i], 1)) + '}$', fontsize=10, color=color)
|
||||
axs[0, 0].text(2.5, 0.4 - i * 0.1, f'x $vl_{"{0.95}"}=' + '10^{' + str(np.round(crits[i], 1)) + '}$', fontsize=10, color=color)
|
||||
axs[0, 0].plot(crits[i], 0.95, 'x', color=color)
|
||||
|
||||
if show_lines:
|
||||
|
|
|
|||
Loading…
Reference in a new issue