Esempio n. 1
0
#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-

# FIXME change the shebang on the cluster
# we assume the number of age classes m is 3

from lyaper import *
from stdin_with_pandas import stdin_to_array
import numpy as np
import matplotlib.pyplot as plt
import sys

info, full_t_ser = stdin_to_array()

#t_ser = cut_transient(365 * 100, full_t_ser)
t_ser = full_t_ser

t = t_ser['t'] / 365
h = t_ser['h']
inc1 = t_ser['inc1']
inc2 = t_ser['inc2']

n = info['n'] // 2
m = info['m']
a = n // 12
print("n :", n)
print("m :", m)
print("a :", a)

x = t_ser.iloc[:, 2 + m : n + 2 + m]
dx = t_ser.iloc[:, n + 2 + m :]
Esempio n. 2
0
#!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-

# FIXME change the shebang on the cluster

from lyaper import *
from stdin_with_pandas import stdin_to_array
import numpy as np
import matplotlib.pyplot as plt
import sys

info, full_t_ser = stdin_to_array()
n = info['n'] // 2 
m = info['m']

#t_ser = cut_transient(365 * 100, full_t_ser)
t_ser = full_t_ser

t = t_ser['t'] / 365
h = t_ser['h']
inc = t_ser['inc']

x = t_ser.loc[:, 'S':'R']
dx = t_ser.loc[:, 'dS':'dR']

n_hosts = x.sum(axis=1)
s = x['S']
i = x['I']
r = x['R']

f1 = plt.figure()