def get_t(x):
    g0 = accumulate(x[int(tdly / step):, 0])
    g1 = accumulate(x[int(tdly / step):, 1])
    for t in range(5000):
        a0 = g0.next()
        a1 = g1.next()
        if abs(a0 - a1) >= thresh:
            break
    return t + int(tdly / step), a0, a1
Exemple #2
0
def get_t(x):
    g0 = accumulate(x[int(tdly / step):, 0])
    g1 = accumulate(x[int(tdly / step):, 1])
    for t in range(5000):
        a0 = g0.next()
        a1 = g1.next()
        if abs(a0 - a1) >= thresh:
            break
    return t + int(tdly / step), a0, a1
def get_t(x, c):
    g0 = accumulate(x)
    th = thresh * gamma ** c
    for t in range(3500):
        if g0.next() >= th:
            break
    return t
Exemple #4
0
def get_t(x, c):
    g0 = accumulate(x)
    th = thresh * gamma**c
    for t in range(3500):
        if g0.next() >= th:
            break
    return t
pl.xticks([-2, 0, 2], [-2, 0, 2])
pl.xlabel('Residual')
simpleaxis(pl.gca())
pl.gca().axes.get_yaxis().set_visible(False)
pl.subplots_adjust(.17, .3, .99, .99)
if savefig:
    pl.savefig('residuals.pdf', dpi=600)
else:
    pl.show()


res2 = np.array(s['RT'].mean(1))
res2[:, 1, 0] = 1. / 3
fig = pl.figure()
for r in range(9):
    g = accumulate(
        res2[r, int(tdly / step):, 0] - res2[r, int(tdly / step):, 1])
    pc = np.zeros(5000)
    for i in range(int(tdly / step), 5000):
        pc[i] = g.next()
    pl.plot(np.arange(0, 1000, step), pc, color=col2[r], clip_on=False)
pl.plot([0, 300], [thresh, thresh], c='r')
pl.plot([60, 60], [-.5, thresh + .5], '--', color='black')
# labels & layout
pl.xlabel('Time from offer [s]')
pl.ylabel('Spike count difference', y=.44)
pl.xticks([0, 100, 200], [0, .1, .2])
pl.xlim(0, 300)
pl.yticks([0, 5, 10], [0, 5, 10])
pl.ylim(-.5, thresh + .5)
simpleaxis(pl.gca())
pl.subplots_adjust(.17, .22, .99, .99)
Exemple #6
0
        color=col[1])
pl.xticks([-2, 0, 2], [-2, 0, 2])
pl.xlabel('Residual')
simpleaxis(pl.gca())
pl.gca().axes.get_yaxis().set_visible(False)
pl.subplots_adjust(.17, .3, .99, .99)
if savefig:
    pl.savefig('residuals.pdf', dpi=600)
else:
    pl.show()

res2 = np.array(s['RT'].mean(1))
res2[:, 1, 0] = 1. / 3
fig = pl.figure()
for r in range(9):
    g = accumulate(res2[r, int(tdly / step):, 0] -
                   res2[r, int(tdly / step):, 1])
    pc = np.zeros(5000)
    for i in range(int(tdly / step), 5000):
        pc[i] = g.next()
    pl.plot(np.arange(0, 1000, step), pc, color=col2[r], clip_on=False)
pl.plot([0, 300], [thresh, thresh], c='r')
pl.plot([60, 60], [-.5, thresh + .5], '--', color='black')
# labels & layout
pl.xlabel('Time from offer [s]')
pl.ylabel('Spike count difference', y=.44)
pl.xticks([0, 100, 200], [0, .1, .2])
pl.xlim(0, 300)
pl.yticks([0, 5, 10], [0, 5, 10])
pl.ylim(-.5, thresh + .5)
simpleaxis(pl.gca())
pl.subplots_adjust(.17, .22, .99, .99)