Пример #1
0
def f3b():
    dg = delta_gs3(Gkcc=range(1, 1000), Gna=[20], Gk=[70], Gcl=[20])
    print "\nFigure 3B"
    minithreefig([dg[0], dg[1], dg[2], dg[5], dg[-1], dg[4]],
                 'k',
                 x=np.log10(20),
                 yl=[[-100, -60], [1.9e-12, 2.05e-12], [0, 24]])
    #minithreefig([10**dg[0],dg[1],dg[2],dg[5],dg[-1],dg[4]],'k',x=np.log10(20),yl=[[-100,-60],[1.9e-12,2.05e-12],[0,24]])
    #plt.savefig('f3b.eps')
    plt.show()
    return dg[0], dg[4], dg[1], dg[5]
def f4d(f=2e-3, new=0, title='f4d.eps'):
    print "\nFigure 4D"

    #dxe=plm(gx=0,xt=1600,two=0,tt=3000,f4d=f,neww=0,graph=1,p=(10**(-3))/(F),pkcc=1e-3/F)
    dxe = plm(gx=0, xt=360, two=0, tt=1800, f4d=f, neww=0)

    a0, a1, a2 = minithreefig([
        dxe[11][1:-1], dxe[14][1:-1], dxe[13][1:-1], dxe[16][1:-1],
        dxe[10][1:-1], dxe[23][1:-1]
    ],
                              xcolor,
                              yl=[[-100, -70], [1.85e-12, 2.0e-12], [0, 0.09]])
    print(dxe[16][-1] - dxe[14][-1])
    #print (dxe[16][350]-dxe[14][350])

    if new == 1:
        delta = plm(gx=0, xt=360, two=0, tt=1800, f4d=f, neww=1, graph=0)
        a0.plot(delta[11][1:-1],
                delta[14][1:-1],
                color=clcolor,
                linestyle='--')
        a0.plot(delta[11][1:-1], delta[13][1:-1], color=kcolor, ls='--')
        a0.plot(delta[11][1:-1], delta[16][1:-1], 'k', ls='--')
        a1.plot(delta[11][1:-1], delta[10][1:-1], color=wcolor,
                ls='--')  #volume
        a2.plot(delta[11][1:-1], delta[23][1:-1], color=xcolor,
                ls='--')  #conc X
    plt.savefig(title)
    plt.show()
    return dxe
def sf4c(GX=[5e-10, 1e-9, 5e-9, 7e-9, 1e-8, 2e-8],
         tt=600,
         xt=25,
         ratio=0.98,
         xend=0):
    deltecl = []
    maxdeltecl = []
    deltw = []
    deltx = []
    for i in GX:
        dex = plm(gx=i, xt=xt, tt=tt, ratio=ratio, xend=xend)
        deltecl.append(dex[14][-1] - dex[14][1])
        maxdeltecl.append(max(np.absolute((dex[14] - dex[14][1]))))
        deltw.append((dex[10][-1]) / dex[10][1])
        deltx.append(max(np.absolute((dex[20] - dex[20][1]))))
        minithreefig([
            dex[11][1:-1], dex[14][1:-1], dex[13][1:-1], dex[16][1:-1],
            dex[10][1:-1], dex[20][1:-1]
        ], xcolor)
    print maxdeltecl
    twoaxes(GX, deltecl, maxdeltecl, deltx, deltw)
    return
Пример #4
0
def f3a():
    dg = plm(tk=120, tt=600)
    print "Figure 3A"
    a1, a2, a3 = minithreefig([
        dg[11][4:-1], dg[14][4:-1], dg[13][4:-1], dg[16][4:-1], dg[10][4:-1],
        dg[24][4:-1]
    ],
                              'k',
                              yl=[[-100, -70], [1.92e-12, 1.98e-12], [0,
                                                                      6e-7]])
    #plt.savefig('f3a.eps')
    plt.show()
    print dg[24][-1]
    print dg[14][0]
    print dg[17][0]
    print dg[17][-1]
    print dg[14][-1]
    return dg
def f4c(gX=1e-8,
        tt=3600,
        xt=360,
        xend=420,
        xflux=4e-7,
        new=0,
        title='f4c.eps',
        ham=0):  #doubles as f6c when new!=0
    dex = plm(gx=gX, xt=xt, tt=tt, xflux=xflux, xend=xend, graph=0, hamada=0)
    delta = []
    delta1 = []

    if new == 0:
        print "\nFigure 4C"
        ax0, ax1, ax2 = minithreefig([
            dex[11][1:-1], dex[14][1:-1], dex[13][1:-1], dex[16][1:-1],
            dex[10][1:-1], dex[20][1:-1]
        ],
                                     xcolor,
                                     yl=[[-100, -70], [1.9e-12, 2.5e-12],
                                         [154, 157]])

    else:
        print "\nFigure 6C"
        ax0, ax1, ax2 = minithreefig([
            dex[11][1:-1], dex[14][1:-1], dex[13][1:-1], dex[16][1:-1],
            dex[18][1:-1], dex[10][1:-1]
        ],
                                     'k',
                                     yl=[[-100, -70], [13, 19],
                                         [1.8e-12, 2.2e-12]])

        delta = plm(gx=gX,
                    xt=xt,
                    tt=tt,
                    xflux=xflux,
                    xend=xend,
                    neww=3,
                    graph=0,
                    hamada=ham)
        ax0.plot(delta[11][1:-1],
                 delta[14][1:-1],
                 color=clcolor,
                 linestyle='--')
        ax0.plot(delta[11][1:-1], delta[13][1:-1], color=kcolor, ls='--')
        ax0.plot(delta[11][1:-1], delta[16][1:-1], 'k', ls='--')
        print(delta[16][-1] - delta[14][-1])
        print(delta[16][350] - delta[14][350])
        print len(delta[16])
        ax1.plot(delta[11][1:-1], delta[18][1:-1], color=nacolor,
                 ls='--')  #nai
        ax2.plot(delta[11][1:-1], delta[10][1:-1], color='k', ls='--')  #volume

        delta1 = plm(gx=gX,
                     xt=xt,
                     tt=tt,
                     xflux=xflux,
                     xend=xend,
                     neww=5,
                     graph=0,
                     hamada=ham)
        if ham == 1:
            delta2 = plm(gx=gX,
                         xt=xt,
                         tt=tt,
                         xflux=xflux,
                         xend=xend,
                         graph=0,
                         hamada=ham)
            ax0.plot(delta2[11][1:-1],
                     delta2[14][1:-1],
                     color=clcolor,
                     linestyle=':')
            ax0.plot(delta2[11][1:-1], delta2[13][1:-1], color=kcolor, ls=':')
            ax0.plot(delta2[11][1:-1], delta2[16][1:-1], 'k', ls=':')
            ax1.plot(delta2[11][1:-1], delta2[18][1:-1], color=nacolor,
                     ls=':')  #nai
            ax2.plot(delta2[11][1:-1], delta2[10][1:-1], color='k',
                     ls=':')  #volume
            print(delta2[16][-1] - delta2[14][-1])
            print len(delta2[16])
        ax0.plot(delta1[11][1:-1],
                 delta1[14][1:-1],
                 color=clcolor,
                 linestyle='-.')
        ax0.plot(delta1[11][1:-1], delta1[13][1:-1], color=kcolor, ls='-.')
        ax0.plot(delta1[11][1:-1], delta1[16][1:-1], 'k', ls='-.')
        ax1.plot(delta1[11][1:-1], delta1[18][1:-1], color=nacolor,
                 ls='-.')  #nai
        ax2.plot(delta1[11][1:-1], delta1[10][1:-1], color='k',
                 ls='-.')  #volume
        print(delta1[16][-1] - delta1[14][-1])
        print len(delta1[16])
    plt.savefig(title)
    plt.show()
    return dex, delta, delta1