really stop it
@@ -28,11 +28,12 @@ scenarios = {
# Other options
-do_save = 0
+do_save = 0 # refers to whether to save plot - see also save_sims
+do_plot = 0
show_plot = 0
save_sims = 0 # WARNING, huge! (>100 MB)
verbose = 1
-n = 11 # Change to 3 for quick, 11 for real
+n = 3 # Change to 3 for quick, 11 for real
xmin = 52 # pars['day_0']
xmax = xmin+200 # xmin + pars['n_days']
interv_day = 10
@@ -138,6 +139,9 @@ if do_run:
else:
allres = sc.loadobj(obj_path)
+
+if do_plot:
+
sc.heading('Plotting')
fig_args = {'figsize': (16, 12)}
@@ -155,9 +159,6 @@ pl.rcParams['font.family'] = 'Proxima Nova'
# Create the tvec based on the results -- #TODO: make better!
tvec = xmin + pl.arange(len(allres[reskeys[0]].baseline.best))
-
-
-
# %% Plotting
for rk, reskey in enumerate(reskeys):
pl.subplot(len(reskeys), 1, rk + 1)
@@ -175,7 +176,8 @@ for rk,reskey in enumerate(reskeys):
if reskey == 'cum_exposed':
sc.setylim()
pl.title('Cumulative infections')
- pl.text(0.0, 1.1, 'COVID-19 projections, per 1 million susceptibles', fontsize=24, transform=pl.gca().transAxes)
+ pl.text(0.0, 1.1, 'COVID-19 projections, per 1 million susceptibles', fontsize=24,
+ transform=pl.gca().transAxes)
elif reskey == 'n_exposed':
pl.legend()
@@ -194,19 +196,19 @@ for rk,reskey in enumerate(reskeys):
pl.gca().set_xticklabels(lab)
sc.commaticks(axis='y')
-
-#%% Print statistics
-for reskey in reskeys:
- for scenkey in list(scenarios.keys()):
- print(f'{reskey} {scenkey}: {allres[reskey][scenkey].best[-1]:0.0f}')
-
if do_save:
pl.savefig(fig_path, dpi=150)
if do_run: # Don't resave loaded data
sc.saveobj(obj_path, allres)
-sc.toc()
-
if show_plot: # Optionally show plot
pl.show()
+
+#%% Print statistics
+for reskey in reskeys:
+ for scenkey in list(scenarios.keys()):
+ print(f'{reskey} {scenkey}: {allres[reskey][scenkey].best[-1]:0.0f}')
+
+sc.toc()
+
