예제 #1
0
def test_GN_06():
    conf = hearsay.Parser()
    conf.load_config(['nran'], ['1'])
    G = hearsay.C3Net(conf)
    G.set_parameters()
    A = [20000, 30000]
    S = [10000, 12000]
    D = [10000]
    lista = [A, S, D]
    G.set_parameters(spars=lista)
    res = G.run(interactive=True)
    R = hearsay.Results(G)
    R.load()
    res = R.redux_2d()
    assert len(res) == 2
예제 #2
0
def test_results_01():
    conf = hearsay.Parser()
    conf.load_config(['nran'], ['1'])
    G = hearsay.C3Net(conf)
    G.set_parameters()
    A = [20000, 30000]
    S = [10000, 12000]
    D = [10000]
    lista = [A, S, D]
    G.set_parameters(spars=lista)
    res = G.run(interactive=True)

    R = hearsay.Results(G)
    R.load()
    res = R.show_ccns(0, True)
    assert isinstance(res, dict)
예제 #3
0
config = hearsay.Parser('F2b.ini')
config.load_config()
G = hearsay.C3Net(config)
G.set_parameters(df)

G.run()

# 2) Leer las simulaciones :::::::::::::::::::::

dfa = pd.read_csv('F2b.csv')
config = hearsay.Parser('F2b.ini')
config.load_config()
G = hearsay.C3Net(config)
G.set_parameters(dfa)

R = hearsay.Results(G)
R.load()
res = R.redux()
ib = res['lI']

fig = plt.figure()
ax = fig.add_subplot()
for k, inbox in enumerate(ib):
    imax = max(inbox)
    breaks = np.array(range(imax + 1)) + 0.5
    hy, hx = np.histogram(inbox, breaks, density=True)

    xx = breaks[:-1] + 0.5
    yy = np.cumsum(hy)

    lbl = (f"A={R.params.iloc[k]['tau_awakening']},"