fig.add('choice-lower', [x0, y0, w, h]) fig.add('choice-upper', [fig[-1].x, fig[-1].top + DY, w, h]) fig.add('activity-1', [fig['choice-upper'].right + DX, fig['choice-upper'].y, w, h]) fig.add('activity-2', [fig[-1].right + dx, fig[-1].y, w, h]) fig.add('activity-3', [fig[-1].right + dx, fig[-1].y, w, h]) fig.add('activity-4', [fig['choice-lower'].right + DX, fig['choice-lower'].y, w, h]) fig.add('activity-5', [fig[-1].right + dx, fig[-1].y, w, h]) fig.add('activity-6', [fig[-1].right + dx, fig[-1].y, w, h]) plotlabels = {'A': (0.01, 0.935), 'B': (0.28, 0.935)} fig.plotlabels(plotlabels) #========================================================================================= plot = fig['choice-upper'] kwargs = {'ms': 4.5, 'lw': 1.25} analysis.choice_pattern(trialsfile_b, model.offers, plot, **kwargs) plot.yticks([0, 50, 100]) plot.text_upper_left('1A = {}B'.format(model.A_to_B), fontsize=7.5, color=Figure.colors('green')) #=========================================================================================
fig.add('task', [x0, y0, w_task, h_task]), fig.add('sure-stimulus-duration', [x0, y1, w_behavior, h_behavior]), fig.add('correct-stimulus-duration', [fig[-1].right + DX, y1, w_behavior, h_behavior]), fig.add('noTs-stimulus', [x0, y2, w_fr, h_fr]), fig.add('noTs-choice', [fig[-1].right + dx, y2, 5 / 8 * w_fr, h_fr]), fig.add('Ts-stimulus', [fig[-1].right + 1.1 * DX, y2, w_fr, h_fr]), fig.add('Ts-sure', [fig[-1].right + dx, y2, w_fr, h_fr]), fig.add('Ts-choice', [fig[-1].right + dx, y2, 5 / 8 * w_fr, h_fr]) pl_x0 = 0.025 pl_y0 = 0.945 pl_y1 = 0.595 pl_y2 = 0.28 plotlabels = {'A': (pl_x0, pl_y0), 'B': (pl_x0, pl_y1), 'C': (pl_x0, pl_y2)} fig.plotlabels(plotlabels, fontsize=9) #========================================================================================= # Task #========================================================================================= rng = np.random.RandomState(1) plot = fig['task'] plot.axis_off('left') plot.axis_off('bottom') ms = 2.5 dx_circ = 0.14 dy_above = +0.08 dy_below = -0.1
fig.add('romo-1', [fig['romo-0'].right+dx, fig['romo-behavior'].y, w_activity, h_activity]) fig.add('romo-2', [fig['romo-1'].right+dx, fig['romo-behavior'].y, w_activity, h_activity]) #========================================================================================= # Annotations #========================================================================================= pl_x0 = 0.02 plotlabels = { 'A': (pl_x0, 0.96), 'B': (pl_x0, 0.52), 'C': (pl_x0, 0.25) } fig.plotlabels(plotlabels, fontsize=12) plot = fig['mante-m'] plot.text_upper_center(r'\textbf{Behavior}', fontsize=9.5, dy=0.14) plot.text_upper_center(r'\textbf{Neural activity}', fontsize=9.5, dx=2.5, dy=0.14) #========================================================================================= kwargs = dict(ms=5, lw=1) mante_analysis.psychometric(mante_behavior, {'m': fig['mante-m'], 'c': fig['mante-c']}, **kwargs) plot = fig['mante-m'] plot.xlabel('Percent motion coherence') plot.ylabel('Percent choice R')
fig.add('noTs-stimulus', [x0, y2, w_fr, h_fr]), fig.add('noTs-choice', [fig[-1].right+dx, y2, 5/8*w_fr, h_fr]), fig.add('Ts-stimulus', [fig[-1].right+1.1*DX, y2, w_fr, h_fr]), fig.add('Ts-sure', [fig[-1].right+dx, y2, w_fr, h_fr]), fig.add('Ts-choice', [fig[-1].right+dx, y2, 5/8*w_fr, h_fr]) pl_x0 = 0.025 pl_y0 = 0.945 pl_y1 = 0.595 pl_y2 = 0.28 plotlabels = { 'A': (pl_x0, pl_y0), 'B': (pl_x0, pl_y1), 'C': (pl_x0, pl_y2) } fig.plotlabels(plotlabels, fontsize=9) #========================================================================================= # Task #========================================================================================= rng = np.random.RandomState(1) plot = fig['task'] plot.axis_off('left') plot.axis_off('bottom') ms = 2.5 dx_circ = 0.14 dy_above = +0.08 dy_below = -0.1
h_activity ]) fig.add( 'romo-1', [fig['romo-0'].right + dx, fig['romo-behavior'].y, w_activity, h_activity]) fig.add( 'romo-2', [fig['romo-1'].right + dx, fig['romo-behavior'].y, w_activity, h_activity]) #========================================================================================= # Annotations #========================================================================================= pl_x0 = 0.02 plotlabels = {'A': (pl_x0, 0.96), 'B': (pl_x0, 0.52), 'C': (pl_x0, 0.25)} fig.plotlabels(plotlabels, fontsize=12) plot = fig['mante-m'] plot.text_upper_center(r'\textbf{Behavior}', fontsize=9.5, dy=0.14) plot.text_upper_center(r'\textbf{Neural activity}', fontsize=9.5, dx=2.5, dy=0.14) #========================================================================================= kwargs = dict(ms=5, lw=1) mante_analysis.psychometric(mante_behavior, { 'm': fig['mante-m'], 'c': fig['mante-c'] }, **kwargs)
fig.add('choice-lower', [x0, y0, w, h]) fig.add('choice-upper', [fig[-1].x, fig[-1].top+DY, w, h]) fig.add('activity-1', [fig['choice-upper'].right+DX, fig['choice-upper'].y, w, h]) fig.add('activity-2', [fig[-1].right+dx, fig[-1].y, w, h]) fig.add('activity-3', [fig[-1].right+dx, fig[-1].y, w, h]) fig.add('activity-4', [fig['choice-lower'].right+DX, fig['choice-lower'].y, w, h]) fig.add('activity-5', [fig[-1].right+dx, fig[-1].y, w, h]) fig.add('activity-6', [fig[-1].right+dx, fig[-1].y, w, h]) plotlabels = { 'A': (0.01, 0.935), 'B': (0.28, 0.935) } fig.plotlabels(plotlabels) #========================================================================================= plot = fig['choice-upper'] kwargs = {'ms': 4.5, 'lw': 1.25} analysis.choice_pattern(trialsfile_b, model.offers, plot, **kwargs) plot.yticks([0, 50, 100]) plot.text_upper_left('1A = {}B'.format(model.A_to_B), fontsize=7.5, color=Figure.colors('green')) #=========================================================================================