コード例 #1
0
            x.plot(time / 1000, amplitudes[l] * np.ones(time.shape), 'g', lw=1)
            x.plot(time / 1000,
                   amplitudes_2[l] * np.ones(time.shape),
                   'g',
                   lw=1)

            x.plot(time / 1000, np.ones(time.shape), 'gray', lw=1)

            [i.set_linewidth(1) for i in x.spines.itervalues()]
            for item in (x.get_xticklabels() + x.get_yticklabels()):
                item.set_fontsize(8)
            # if l==0 or l==1:
            #     x.set_ylim([gl_min,gl_max])
            # else:
            #     x.set_ylim([non_p_min,non_p_max])
            ff.simpleaxis_many_panels(x)
            start, end = x.get_xlim()
            x.xaxis.set_ticks(
                [0, 300, 600,
                 900])  #(np.arange(start, end,math.ceil((end-start)/4.)))

            x.set_xlabel('time [s]', fontsize=10)
            ylim = x.get_ylim()
            x.text(-50, ylim[-1] + (ylim[-1] - ylim[0]) / 20, fig_labels[l])

        ax[0].set_ylabel('AMPAr phosphorylation', fontsize=10)

        #ax[2].set_ylabel('pGluR ',fontsize=20)
        ax[0].set_xlabel('time [s]', fontsize=10)
        ax[1].set_xlabel('time [s]', fontsize=10)
        #ax[0].set_title('E-LTP  paradigms',fontsize=10)
コード例 #2
0
                       color=config_long.thresh,
                       lw=1)
        ax[2 + i].plot(time[i] / 1000,
                       config.spine_thresh[-1] * np.ones(time[i].shape),
                       ':',
                       color=config_long.thresh,
                       lw=1)
        for j in [7, 3, 2]:
            key = 'spine ' + str(j)

            ax[2 + i].plot(time[i][:-90] / 1000,
                           out[j][:-90],
                           config_long.sp[key],
                           label=key,
                           lw=1)
        ff.simpleaxis_many_panels(ax[i + 2])
        if i > 0:
            ax[3].legend(loc=4)
        start, end = 0, 2
        ax[2 + i].set_ylim([start, end])
        ax[2 + i].set_xlim([0, time[i][-1] / 1000])
        #

    ax[2].set_ylabel('Spine signature a.u.', fontsize=10)

    ax[1].yaxis.set_ticks([])
    ax[3].yaxis.set_ticks([])
    ax[5].yaxis.set_ticks([])
    ax[0].xaxis.set_ticks([])
    ax[1].xaxis.set_ticks([])
    ax[2].xaxis.set_ticks([])
コード例 #3
0
                for gugu, smooth in enumerate(to_smoothe):
                    if smooth.max() > maxi[gugu]:
                        maxi[gugu] = smooth.max()
                    if smooth.min() < mini[gugu]:
                        mini[gugu] = smooth.min()

                for k, smooth in enumerate(to_smoothe):

                    ax[k * 2 + l].hold(True)
                    #ax2.plot(time_st/1000,smooth,config.sp[key][2],label=config.sp[key][1],lw=1)
                    ax[k * 2 + l].plot(time_st / 1000,
                                       smooth,
                                       config.sp[key][2],
                                       label=config.sp[key][1],
                                       lw=1)
                    ff.simpleaxis_many_panels(ax[k * 2 + l])

        if 'no_PKAc' in fname:
            ax[3].legend()

            ax[4].plot(time_st / 1000,
                       config.spine_thresh[0] * np.ones(time_st.shape),
                       ':',
                       color=config.thresh,
                       lw=1)
            ax[4].plot(time_st / 1000,
                       config.spine_thresh[1] * np.ones(time_st.shape),
                       ':',
                       color=config.thresh,
                       lw=1)
            ax[5].plot(time_st / 1000,
コード例 #4
0
                    out = f.calculate_signature_dendrite(new_data)
                else:
                    out = f.calculate_signature_spine(new_data)

                if out.max() > maxi:
                    maxi = out.max()
                if out.min() < mini:
                    mini = out.min()
                ax[l].hold(True)

                ax[l].plot(time_st[:-90] / 1000,
                           out[:-90],
                           config.sp[key][2],
                           label=config.sp[key][1],
                           lw=1)
                ff.simpleaxis_many_panels(ax[l])
                ax[l].set_title(endi[l], fontsize=10)

            ax[0].legend()  #bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)

        fig_labels = ['A', 'B']
        ax[0].plot(time_st / 1000,
                   config.spine_thresh[0] * np.ones(time_st.shape),
                   ':',
                   color=config.thresh,
                   lw=1)
        ax[0].plot(time_st / 1000,
                   config.spine_thresh[1] * np.ones(time_st.shape),
                   ':',
                   color=config.thresh,
                   lw=1)
コード例 #5
0
        new_dt = time_[1] - time_[0]
        base = r[150 / new_dt:250 / new_dt].mean()
        print new_dt
        res = (r - base) / base * 100
        if i < 4:
            ax2.plot(time_, res, label=labels[i], lw=1, color=colors[i])
        else:
            ax2.plot(time_, res, label=labels[i], lw=2, color=colors[i])

        # else:
        #     ax2.plot(time_,res,label='simplified model',lw=1)
    ax2.set_xlabel('time (s)', fontsize=10)
    ax1.set_ylabel(u'Fluorescence ratio (%)', fontsize=10)
    ax2.set_ylabel(u'Epac (%)', fontsize=10)
    ff.simpleaxis_many_panels(ax1)
    ff.simpleaxis_many_panels(ax2)
    ax1.legend(loc=2)
    ax2.legend(loc=2)
    ax = [ax1, ax2]
    for m, x in enumerate(ax):
        [i.set_linewidth(1) for i in x.spines.itervalues()]
        for item in (x.get_xticklabels() + x.get_yticklabels()):
            item.set_fontsize(8)
        x.set_xlim([-300, 600])
        x.xaxis.set_ticks([-300, 0, 300, 600])
        if m in [0]:
            x.axes.get_xaxis().set_ticklabels([])
            start, end = x.get_xlim()
            #x.xaxis.set_ticks([-200,0,250,500])#np.arange(start, end,math.ceil(end-start)/4.))
            x.yaxis.set_ticks([0, 20, 40, 60])
コード例 #6
0
                        new_data.append(d / st[l][i] /
                                        config.max_val[l][config.keys[i]])
                if l:
                    out = f.calculate_signature_dendrite(new_data)
                else:
                    out = f.calculate_signature_spine(new_data)

                if out.max() > maxi:
                    maxi = out.max()
                ax[l * 2 + k].hold(True)
                ax[l * 2 + k].plot(time_st / 1000,
                                   out,
                                   config.sp[key][2],
                                   label=config.sp[key][1],
                                   lw=1)
                ff.simpleaxis_many_panels(ax[l * 2 + k])
                print fname

            #ax[l*2+k].legend(loc=2)

    fig_labels = ['A', 'C', 'B', 'D']

    ax[0].plot(time_st / 1000,
               config.spine_thresh[0] * np.ones(time_st.shape),
               ':',
               color=config.thresh,
               lw=1)
    ax[0].plot(time_st / 1000,
               config.spine_thresh[1] * np.ones(time_st.shape),
               ':',
               color=config.thresh,