...
 
Commits (2)
......@@ -180,15 +180,13 @@ def plot_age_attack_rate(ax, sim, N, label):
ax.plot(age_groups, attack_rate, 'o-', label=label)
if __name__ == '__main__':
def main(configfile):
parser = optparse.OptionParser()
parser.add_option("--config", "-c", dest="config",
help="configuration file")
options, args = parser.parse_args()
with open(options.config, 'r') as ymlfile:
with open(configfile, 'r') as ymlfile:
config = yaml.load(ymlfile)
global age_groups
K_tt, age_groups = load_age_mixing(config['data']['age_mixing_matrix_term'])
K_hh, _ = load_age_mixing(config['data']['age_mixing_matrix_hol'])
......@@ -232,3 +230,11 @@ if __name__ == '__main__':
fig_uk.gca().grid(True)
plt.show()
if __name__ == '__main__':
parser = optparse.OptionParser()
parser.add_option("--config", "-c", dest="config",
help="configuration file")
options, args = parser.parse_args()
main(options.config)