for trial in exp.task:
        exp.model.process(exp.task, trial, model=exp.model)
    records[1] = exp.task.records

    return records


experiment = Experiment(model="model.json", task="task.json",
                        result="data/theoretical/D1-on-D2-off.npy",
                        report="data/theoretical/D1-on-D2-off.txt",
                        n_session=12, n_block=2, seed=46)
records = experiment.run(session, "D1-on-D2-off")


n = 10
# Get all data on day 0 where gpi is active
D1 = get('10', day=0, gpi=1, n_trial=60, key='success')
# Get all data on day 1 where gpi is inactive
D2 = get('10', day=1, gpi=0, n_trial=60, key='success')

D1_start = [np.mean(session[:n]) for session in D1]
D1_end = [np.mean(session[-n:]) for session in D1]
D2_start = [np.mean(session[:n]) for session in D2]
D2_end = [np.mean(session[-n:]) for session in D2]

print("D1 start: %.3f  ±%.3f (std)  ±%.3f (sem)" % stats(D1_start))
print("D1 end:   %.3f  ±%.3f (std)  ±%.3f (sem)" % stats(D1_end))
print("D2 start: %.3f  ±%.3f (std)  ±%.3f (sem)" % stats(D2_start))
print("D2 end:   %.3f  ±%.3f (std)  ±%.3f (sem)" % stats(D2_end))
print()
    ax.text(3, 2.25, title[1:], ha="left", va="top", color="0.0", fontsize=10)

    ax.set_xticks([])
    ax.set_yticks([])


if __name__ == '__main__':

    plt.figure(figsize=(10, 6))
    session = 5

    from data.theoretical.data import get

    # -------------------------------------------------------------------------
    # Get all data on day 0 where gpi is active
    rewards = get('10', day=0, gpi=1, n_trial=60, key='reward')[session]
    choices = get('10', day=0, gpi=1, n_trial=60, key='cue')[session]
    values = get('10', day=0, gpi=1, n_trial=60, key='value')[session][:, :2]
    weights = get('10', day=0, gpi=1, n_trial=60,
                  key='CTX:cog -> CTX:ass')[session][:, :2]

    # Get all data on day 1 where gpi is inactive
    rewards = np.append(rewards,
                        get('10', day=1, gpi=0, n_trial=60,
                            key='reward')[session],
                        axis=0)
    choices = np.append(choices,
                        get('10', day=1, gpi=0, n_trial=60,
                            key='cue')[session],
                        axis=0)
    values = np.append(values,