Ejemplo n.º 1
0
def plot(bbs,ind,As=None,name='',verbose=False):
    lss=['-', '--', '-.', ':']*4
    bbs=np.array(bbs)
    if As!=None: A=np.array(As)
    p1=bbs[:,:,0,0].real
    p2=bbs[:,:,0,1].real
    mu=bbs[:,:,1,0].real
    rho=-bbs[:,:,1,1].real
    rhoc=min([min(r) for r in rho])#rho, in units used at Tc
    if verbose: print 'rhoc: '+str(rhoc)
    zh=1.#choice of length units makes zh numerically constant
    T=3./(zh*4.*np.pi)#temp of solution in units used, this is constant by choice of units
    for osci in range(len(rho)):
        Tc=T*np.sqrt(rho[osci]/rhoc)#critical temp, in units used for all solutions
        fig(1)
        pl.plot(T/Tc,np.power(np.abs(p2[osci])*np.sqrt(2.),1./(ind[0][0][1]))/Tc,c='k',ls=lss[osci])
        fig(4)
        pl.plot(T/Tc,mu[osci]/Tc,c='k',ls=lss[osci])
        if As!=None:
            fig(7)
            pl.plot(T/Tc,A[osci]/Tc**3,c='k',ls=lss[osci])
        if verbose:
            print 'mu/rho'+str(mu[osci][-1]/rho[osci][-1])
            print 'p2/rho'+str(p2[osci][-1]/rho[osci][-1])
    fig(1)
    pl.plot([0,2], [0,0], c='k', lw=1)
    pl.xlabel('$\\frac{T}{T_c}$')
    pl.ylabel('$\\frac{\\sqrt{O_2}}{T_c}$')
    pl.xlim([0,1.2])
    pl.ylim([-1,10])
    if name: saveFig(name+'O2Tzeros')
    fig(4)
    rho=np.linspace(rhoc*0.2,rhoc*10,1000)
    mu=rho*zh
    Tc=T*np.sqrt(rho/rhoc)#critical temp, in units used for all solutions
    pl.plot(T/Tc,mu/Tc,c='k',ls='-',lw=1)
    pl.xlabel('$\\frac{T}{T_c}$')
    pl.ylabel('$\\frac{\\mu}{T_c}$')
    pl.xlim([0,1.2])
    pl.ylim([0,40])
    if name: saveFig(name+'muTzeros')

    if As!=None:
        fig(7)
        pl.xlabel('$\\frac{T}{T_c}$')
        pl.ylabel('$\\frac{A}{V_{2}T_c^3}$')
        Atriv=4*np.pi*T/3*mu**2/2
        pl.plot(T/Tc, Atriv/Tc**3,c='k',ls='-',lw=1)
        pl.xlim([0,2])
        pl.ylim([0,1.5e3])
        if name: saveFig(name+'A')
Ejemplo n.º 2
0
    for i in range(len(ws)):
        bb,osc=getBoundary(hphi,0,[Tc*ws[i],a2])
        assert osc==0
        sigmas.append(-1j*bb[2][1]/( bb[2][0]*(Tc*ws[i]) ))
    d=1/sigmas[0].real
    m=sigmas[0].imag/(Tc*ws[0])*d**2
    sigma0=1/d
    tau=m*sigma0
    sigma0s.append(sigma0)
    taus.append(tau)
    ms.append(m*Tc)
fig(0)
pl.plot(a2s,sigma0s,c='k',label=r'$\sigma_0$',marker='.')
pl.plot(a2s,taus,c='k',ls='--',marker='.',label=r'$\tau$')
pl.plot(a2s,ms,c='k',ls='--',marker='.',label=r'$\tau$')
'''n=20
k=np.log(sigma0s[-1]/sigma0s[-n])/np.log(a2s[-1]/a2s[-n])
print k
m=np.log(sigma0s[-1]/a2s[-1]**k)
pl.plot([a2s[0],a2s[-1]],[np.exp(m)*a2s[0]**k,np.exp(m)*a2s[-1]**k],ls=':',c='k')
k=np.log(taus[-1]/taus[-n])/np.log(a2s[-1]/a2s[-n])
print k
m=np.log(taus[-1]/a2s[-1]**k)
pl.plot([a2s[0],a2s[-1]],[np.exp(m)*a2s[0]**k,np.exp(m)*a2s[-1]**k],ls=':',c='k')'''
pl.xlabel(r'$\alpha_2$')
pl.xscale('log')
pl.yscale('log')
pl.legend()
saveFig('drudePars')
pl.show()
Ejemplo n.º 3
0
            bb,osc=getBoundary(rhoSol[osci][0],rhoSol[osci][1], [w*T,a2])
            assert(osc==osci)
            return -1j*bb[2][1]/( bb[2][0]*(T*w) )
        nwvs,_,nsigmas=getPlotY(wvs[0],wvs[-1],f,lambda s:s.real*natTK,minN=60,maxTurn=0.1,maxN=150)
        sigmas.append((nwvs,nsigmas))
    for s in sigmas:
        fig(0)
        pl.plot([w*natTK for w in s[0]],[i.real for i in s[1]],ls='-',c='k')
        printText([w*natTK for w in s[0]],[i.real for i in s[1]],0.6,0,'$'+str(nature[j])+'\mathrm{V}$')
        if plotImag:
            fig(1)
            pl.plot([w*natTK for w in s[0]],[i.imag for i in s[1]],ls='-',c='k')
            printText([w*natTK for w in s[0]],[i.imag for i in s[1]],0.6,0,'$'+str(nature[j])+'\mathrm{V}$')
        first=False

print('$\mu_0=%.1fT$'%(murs[0]/nature[0]))
#pl.plot([wvs[0],wvs[-1]],[1,1],ls=':',c='k')
#pl.plot([wvs[0],wvs[-1]],[0,0],ls=':',c='k')
#printText([wvs[0],wvs[-1]],[1,1],0,5.,r'$\sigma=1$')
#pl.legend(loc=3)
#pl.legend(loc='upper right')
fig(0)
pl.xlabel(r'$\omega\ [\mathrm{cm}^{-1}$]')
pl.ylabel(r'$\mathrm{Re}(\sigma)$')
saveFig('graphene2_cond_re_a2_'+str(a2))
fig(1)
pl.xlabel(r'$\omega\ [\mathrm{cm}^{-1}$]')
pl.ylabel(r'$\mathrm{Im}(\sigma)$')
saveFig('graphene2_cond_im_a2_'+str(a2))
pl.show()
Ejemplo n.º 4
0
        tauTc=sigma.imag/(w*sigma0)
        y1s[-1].append(sigma0)
        y2s[-1].append(1/tauTc)
#drude=1/(d-m*1j*w)
fig(0,size=11)
pl.xscale('log')
pl.yscale('log')
for j in range(len(Trs)):
    pl.plot([a2 for a2 in a2s],y1s[j],ls='-',c='k',label=r'$\sigma_0$')
    printText(a2s,y1s[j],100.,0,'$'+str(Trs[j])+'T_c$')
pl.xlabel(r'$\frac{\alpha_2}{L^4}$')
pl.ylabel(r'$\sigma_0$')
ai=50
#pl.legend(loc='upper left')
pl.xlim(a2s[0],a2s[-1])
saveFig('drudeVarMT_sigma0')

fig(1,size=11)
pl.xscale('log')
pl.yscale('log')
pl.xlim(a2s[0],a2s[-1])
for j in range(len(Trs)):
    pl.plot(a2s,y2s[j],ls='-',c='k',label=r'$\sigma_0$')
    printText(a2s,y2s[j],10.,0,'$'+str(Trs[j])+'T_c$')
pl.xlabel(r'$\frac{\alpha_2}{L^4}$')
pl.ylabel(r'$\frac{1}{\tau T_c}$')
ai=50
#pl.legend(loc='upper left')
saveFig('drudeVarMT_tau')

pl.show()
Ejemplo n.º 5
0
    #pl.plot(wvs,nsigma.imag)
    mw=0.15
    mi=int(np.interp(mw,wvs,range(len(wvs))))
    Y=abs(nsigma[mi])
    Yd=(abs(nsigma[mi+1])-abs(nsigma[mi-1]))/(wvs[mi+1]-wvs[mi-1])
    gamma=-2./3
    C=Y-Yd*wvs[mi]/gamma
    B=(Y-C)/wvs[mi]**gamma

    fig(0)
    pl.plot(wvs,abs(nsigma)-C,c='k')
    pl.plot(wvs,wvs**gamma*B,ls='--',c='red')
    minAbs=min(wvs[-1]**gamma*B,minAbs) 
    maxAbs=max(wvs[0]**gamma*B,maxAbs) 
    fig(1)
    pl.plot(wvs,np.arctan2(nsigma.imag,nsigma.real)/np.pi*180.)
#pl.plot([wvs[0],wvs[-1]],[1,1],ls=':',c='k')
#pl.plot([wvs[0],wvs[-1]],[0,0],ls=':',c='k')
#printText([wvs[0],wvs[-1]],[1,1],0,5.,r'$\sigma=1$')
#pl.legend(loc=3)
fig(0)
pl.ylim(minAbs,maxAbs)
pl.xlabel(r'$\frac{\omega}{\mu}$')
pl.ylabel(r'$|\sigma_n|-C$')
saveFig('PL_Ts_a2_'+str(a2)+'_abs')
fig(1)
pl.xlabel(r'$\frac{\omega}{\mu}$')
pl.ylabel(r'$\mathrm{arg}(\sigma_n)$')
saveFig('PL_Ts_a2_'+str(a2)+'_arg')
pl.show()
Ejemplo n.º 6
0
        Tc = T * np.sqrt(rho / rhoc)

        bb, osc = getBoundary(1, 0, [0, a2])
        guess = rho / (-bb[1][1])
        from scipy.optimize import fsolve

        hphi = fsolve(lambda hphi: rho + getBoundary(hphi, 0, [0, a2])[0][1][1], guess)

        w = 1e-3 * Tc
        bb, osc = getBoundary(hphi, 0, [w, a2])
        assert osc == 0
        sigma = -1j * bb[2][1] / (bb[2][0] * w)
        sigma0 = sigma.real
        tauTc = sigma.imag / (w * sigma0)
        y1s[-1].append(sigma0)
        y2s[-1].append(1 / tauTc)
fig(0, size=12)
pl.xscale("log")
pl.yscale("log")
pl.xlim(Trs[0], Trs[-1])
pl.ylim(5e-3, 2e4)
for j in range(len(a2s)):
    pl.plot(Trs, [y[j] for y in y2s], ls="-", c="k", label=r"$\frac{1}{\tau T_c}$")
    printText(Trs, [y[j] for y in y2s], 10.0, -0.03, "$10^{" + str(j - 4) + "}L^4$")
pl.xlabel(r"$\frac{T}{T_c}$")
pl.ylabel(r"$\frac{1}{\tau T_c}$")
# pl.legend(loc='upper left')
saveFig("scatvsT_2")

pl.show()
Ejemplo n.º 7
0
from results import loadG, loadGBenchmark, getSfun, getGfun, GlargeNfApp
import pylab as pl
import numpy as np
import matplotlib.pyplot as plt
from fig import fig, saveFig, fill_between, grid_selfmade

N=35000
wm=.021234;

colors=['red', 'green', 'blue', 'violet','yellow']


f=fig(0,size=10)
Nf=1.
kx=1
xs=np.linspace(kx-wm, kx+wm, N)
pl.plot(xs, -2*np.imag(GlargeNfApp(Nf,-1j*xs+0.000001,kx)),label='',color='black')
pl.plot(np.linspace(kx-.0005,kx+.0005,1000),500*[-120000,120000],color='black')
#pl.plot(xs, -np.imag(GlargeNfApp(Nf,-1j*xs+0.00001,kx)),label='',color='blue')
#pl.yscale('log')
pl.xlim([xs[0],xs[-1]])
#pl.legend(loc=4)
pl.ylim([-100000,100000])
grid_selfmade(f.get_axes()[0])
pl.xlabel(r'$\omega/\lambda^2$')
pl.ylabel(r'$A(\omega, k_x=\lambda^2)/\lambda^2$')

saveFig('inconsistency')

plt.show()
Ejemplo n.º 8
0
        nwvs, _, nsigmas = getPlotY(np.log(wvs[0]), np.log(wvs[-1]), f, lambda s: s.real, minN=150, maxTurn=0.1)
        sigmas.append((np.exp(nwvs), nsigmas))
    for s in sigmas:
        pl.plot(s[0], [i.real for i in s[1]], ls="-", c="k", label=r"$\mathrm{Re}(\sigma)$" if first else "")
        if a2 == 0:
            printText(
                s[0], [i.real for i in s[1]], [2, 0.8, 0.35, 0.25][j], [-1 / 0.35, 0, 0, 0][j], "$" + str(Tr) + "T_c$"
            )
        else:
            if (j / 2) * 2 == j or len(Trs) < 8:
                B = 1e6
                # printText(s[0],[i.real for i in s[1]],B,-B/(0.35 if j==0 else 0.27),'$'+str(Tr)+'T_c$')
                # printText(s[0],[i.real for i in s[1]],1/(1-0.25/0.4),-1/(0.4-0.25),'$'+str(Tr)+'T_c$')
                printText(
                    s[0], [i.real for i in s[1]], 1 / (1 - 0.23 / 0.308), -1 / (0.308 - 0.23), "$" + str(Tr) + "T_c$"
                )
        if plotImag:
            pl.plot(s[0], [i.imag for i in s[1]], ls="--", c="k", label=r"$\mathrm{Im}(\sigma)$" if first else "")
            printText(
                s[0], [i.imag for i in s[1]], [1, 0.25, 1.25, -0.7][j], [-1 / 0.58, 0, 0, 0][j], "$" + str(Tr) + "T_c$"
            )
        first = False
# pl.plot([wvs[0],wvs[-1]],[1,1],ls=':',c='k')
# pl.plot([wvs[0],wvs[-1]],[0,0],ls=':',c='k')
# printText([wvs[0],wvs[-1]],[1,1],0,5.,r'$\sigma=1$')
# pl.legend(loc=3)
pl.legend(loc="upper right")
pl.xlabel(r"$\frac{\omega}{\mu}$")
saveFig("cond_Ts_a2_" + str(a2) + "_v2")
pl.show()
Ejemplo n.º 9
0
    printRatio(i,len(ws))
    bb,osc=getBoundary(hphi,0,[Tc*ws[i],a2])
    assert osc==0
    sigmas.append(-1j*bb[2][1]/( bb[2][0]*(Tc*ws[i]) ))

li=0
sigma0=sigmas[li].real
tauTc=sigmas[li].imag/(ws[li]*sigma0) #tau*Tc
drude=sigma0/(1-1j*ws*tauTc)
fig(0,size=11)
pl.plot(ws,[s.real for s in sigmas],c='k',label=r'$\mathrm{AdS/CFT}$')
pl.plot(ws,[s.real for s in drude],c=[1.0,0.,0.],ls='--',label=r'$\mathrm{Drude}$')
pl.plot(ws,[s.imag for s in sigmas],c='k')
pl.plot(ws,[s.imag for s in drude],ls='--',c=[1.,0.,0.])
#pl.plot(ws,[(sigmas[si]-drude[si]).real for si in range(len(drude))],c=[1.0,0.,0.],ls='--',label=r'$\mathrm{Drude}$')
pl.xlabel(r'$\frac{\omega}{T_c}$')
pl.ylabel(r'$\sigma$')
pl.xscale('log')
ai=35
pl.annotate(r'$\mathrm{Re}(\sigma)$',xy=(ws[ai],sigmas[ai].real), xycoords='data',
                          xytext=(-45, -25), textcoords='offset points', fontsize=10,
                                   arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=.2"))

pl.annotate(r'$\mathrm{Im}(\sigma)$',xy=(ws[ai],sigmas[ai].imag), xycoords='data',
                          xytext=(-45, 25), textcoords='offset points', fontsize=10,
                                   arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=-.2"))

pl.legend()
saveFig('drude_T_'+str(Tr)+'Tc_a2_'+str(a2))
pl.show()
Ejemplo n.º 10
0
    pl.plot(cConst/const[osci],As[osci]/Tc**3,ls='-' if sign==1 else '--',c='k')

#pl.plot(Trs,rho*zh/Tc,lw=1)
Trs=np.linspace(0.01,1.2,100)
if a2==0 and False:
    pl.plot(Trs,(4*np.pi/3*T*Trs)*(min([min(r) for r in rhos])*(zh/Trs))**2/2 / T**3,lw=1,c='k')
else:
    from scipy.integrate import cumtrapz
    normAs=[]
    for Tr in Trs:
        rho=min([min(r) for r in rhos])/Tr**2
        Tc=T/Tr
        print rho

        guess=0.1
        from scipy.optimize import fsolve
        hphi=fsolve(lambda hphi:rho+getBoundary(hphi,0,[0,a2])[0][1][1], guess)

        _,_,(zs,y)=getBoundary(hphi, 0, [0,a2], plot=False, returnSol=True)
        Al=[0]+list(cumtrapz([Lfun(*([zs[j]]+[0,a2]+y[j][:-4]+[0,0]))
            for j in range(len(zs))][::-1], x=zs[::-1]))
        normAs.append(Al[-1])
    pl.plot(Trs,normAs/(T/Trs)**3,lw=1,c='k')
    
pl.ylim(0,2500)
#pl.legend(loc='upper right')
pl.xlabel(r'$\frac{T}{T_c}$')
pl.ylabel(r'$\frac{A_\mathrm{fields}}{V_2T_c^3}$')
saveFig('A_constRho_a2_'+str(a2))
pl.show()
Ejemplo n.º 11
0
# pl.plot(Trs,y1s,c='k',ls='-')
# pl.plot(Trs,[y1s[i]+y2s[i] for i in range(len(Trs))],c='k',ls='-')
ymin = min(y1s) * 1.2
fill_between(
    Trs,
    [ymin for i in Trs],
    y1s,
    hatch="/",
    facecolor="white",
    label=r"$\int_0^\infty\mathrm{Re}(\sigma_n(\omega)-1)\mathrm{d}\omega$",
)  # , facecolor='blue', alpha=0.5)
fill_between(
    Trs, y1s, [y1s[i] + y2s[i] for i in range(len(Trs))], hatch=r"\\", facecolor="white", label=r"$\Sigma_\delta$"
)  # , facecolor='red', alpha=0.5)
pl.plot(
    Trs,
    [y1s[i] + y2s[i] for i in range(len(Trs))],
    c="r",
    ls="-",
    label=r"$\Sigma_\delta+\int_0^\infty\mathrm{Re}(\sigma_n(\omega)-1)\mathrm{d}\omega$",
    lw=1,
)
pl.ylim(ymin, -ymin * 0.8)
pl.xlim(Trs[0], Trs[-1])
pl.xlabel(r"$\frac{T}{T_c}$")
pl.ylabel(r"$[T_c]$")
handles, labels = pl.gca().get_legend_handles_labels()
pl.legend(handles[::-1], labels[::-1])
saveFig("sum_rule_a2" + str(a2))
pl.show()
Ejemplo n.º 12
0
#for j in range(len(Nfs)):
#	pl.plot(xs, np.abs([GlargeNf(Nfs[j], 0, w) for w in xs]),label=(r'$N_f\rightarrow\infty$'),color=colors[j],ls='-')
#, N_fk_f='+str(Nfs[j])+'\lambda^2
		#if r==1:
		#	pl.plot(xs, cf(SlargeNf(Nfs[j],xs)),color=colors[j],linestyle='--')
#pl.plot([],[],label=r'$k_x/\lambda^2='+wss+'$',color='white')
pl.xlim([wmin,wmax])
pl.ylim([7e-2,2e2])

grid_selfmade(f.get_axes()[0])

pl.legend(loc=1)
pl.xlabel(r'$k_x/\lambda^2$')
pl.ylabel(r'$|G(\omega=0, k_x)|/\lambda^2$')

saveFig('absG_vs_ks_L='+str(L))

#pl.show()
#sys.exit(0)

f=fig(1,size=14)
pl.plot(xs, np.abs([Gquenchedv1(w,0) for w in xs]),label=(r'$N_fk_f=0$'),color='black')
pl.plot(xs, np.abs([1/w for w in xs]),label=(r'$\lambda=0$'),color='black',ls='--')
for j in range(len(Nfs)):
	pl.loglog(ws, abs(Gs[j](ws,0)),'+',label='$N_fk_f='+str(Nfs[j])+r'\lambda^2$',color=colors[j])
for j in range(len(Nfs)):
	pl.plot(xs, np.abs([GlargeNf(Nfs[j], w, 0) for w in xs]),label=(r'$N_f\rightarrow\infty$'),color=colors[j],ls='-')
#, N_fk_f='+str(Nfs[j])+'\lambda^2
		#if r==1:
		#	pl.plot(xs, cf(SlargeNf(Nfs[j],xs)),color=colors[j],linestyle='--')
#pl.plot([],[],label=r'$k_x/\lambda^2='+wss+'$',color='white')
Ejemplo n.º 13
0
    first=True
    j=0
    for Tr in Trs:
        print('Solving for specific temperature...')
        rho=rhoc/Tr**2
        Tc=T*np.sqrt(rho/rhoc)
        rhoSol=findrho(lambda x,y: getBoundary(x,y,[0,1]), sols, hpsis, bbs, rho)

        print('Solving for different frequencies...')
        sigmas=[]
        for osci in range(len(rhoSol)):
            sigmas.append([])
            for wvi in range(len(wvs)):
                printRatio(osci*len(wvs)+wvi,len(rhoSol)*len(wvs))
                bb,_=getBoundary(rhoSol[osci][0],rhoSol[osci][1], [Tc*wvs[wvi],1])
                sigmas[-1].append(-1j*bb[2][1]/( bb[2][0]*(Tc*wvs[wvi]) ))
        for s in sigmas:
            pl.plot(wvs,[i.real for i in s],ls='-',c='k',label=r'$\mathrm{Re}(\sigma)$'if first else '')
            printText(wvs,[i.real for i in s],[.45,0.3,0.2][j],0,'$'+str(Tr)+'T_c$')
            pl.plot(wvs,[i.imag for i in s],ls='--',c='k',label=r'$\mathrm{Im}(\sigma)$'if first else '')
            printText(wvs,[i.imag for i in s],[1.25,1.25,-0.7][j],0,'$'+str(Tr)+'T_c$')
        first=False
        j+=1
    pl.plot([wvs[0],wvs[-1]],[1,1],ls=':',c='k')
    pl.plot([wvs[0],wvs[-1]],[0,0],ls=':',c='k')
    #printText([wvs[0],wvs[-1]],[1,1],0,5.,r'$\sigma=1$')
    pl.legend(loc=3)
    pl.xlabel(r'$\frac{\omega}{T_c}$')
    saveFig('cond_Ts')
    pl.show()
Ejemplo n.º 14
0
    Cs.append(sigma.real/a2)

#drude=1/(d-m*1j*w)
fig(0,size=11)
k,m=np.polyfit(np.log(Trs),np.log(Cs),1)
print k
print np.exp(m)
plMin,plMax=.8*Trs[0],Trs[-1]/0.8
pl.plot([plMin,plMax],[plMin**k*np.exp(m), plMax**k*np.exp(m)],c='r',label=r'$\mathrm{Power\ fit}$')
pl.plot(Trs,Cs,ls='',marker='x',c='k',label=r'$\sigma_0$')
pl.xscale('log')
pl.yscale('log')
#pl.plot(a2s,y2s,ls='--',c='k',label=r'$\tau T_c$')
#hn=len(a2s)/4
#k=np.log(y1s[-1]/y1s[-2])/np.log(a2s[-1]/a2s[-2])
#m=y1s[-1]/a2s[-1]**k
#print(k)
#print(m)
#pl.plot([a2s[hn], a2s[-1]], [a2s[hn]**k*m, a2s[-1]**k*m],ls='-',c='r')#,label=r'$\mathrm{Power\ fit}$')
mTr=np.sqrt(Trs[0]*Trs[-1])
pl.annotate(('$$%.3f'%np.exp(m))+r'\left(\frac{T}{T_c}\right)^{'+('%.3f'%k)+'}$$',xy=(mTr,mTr**k*np.exp(m)), xycoords='data',
                                  xytext=(-80, -40), textcoords='offset points', fontsize=10,
                                                                     arrowprops=dict(arrowstyle="->"))
handles, labels = pl.gca().get_legend_handles_labels()
pl.legend(handles[::-1], labels[::-1])
pl.xlim(plMin,plMax)
pl.xlabel(r'$\frac{T}{T_c}$')
pl.ylabel(r'$$\lim_{\alpha_2}\rightarrow\infty}\frac{\sigma_0L^4}{\alpha_2}$$')
saveFig('drudeTdep_1e4')
pl.show()
Ejemplo n.º 15
0
        guess=rho/(-bb[1][1])
        from scipy.optimize import fsolve
        hphi=fsolve(lambda hphi:rho+getBoundary(hphi,0,[0,a2])[0][1][1], guess)
        rhoSol=[[hphi,0]]
    assert(len(rhoSol)==1)
    sigmas=[]
    for osci in range(len(rhoSol)):
        bb,osc=getBoundary(rhoSol[osci][0],rhoSol[osci][1], [0,a2])
        mu=bb[1][0]
        sigmas.append([])
        for wvi in range(len(wvs)):
            bb,osc=getBoundary(rhoSol[osci][0],rhoSol[osci][1], [mu*wvs[wvi],a2])
            assert(osc==osci)
            sigmas[-1].append(-1j*bb[2][1]/( bb[2][0]*(mu*wvs[wvi]) ))
    for s in sigmas:
        pl.plot(wvs,[i.imag for i in s],ls='-',c='k',label=r'$\mathrm{Im}(\sigma)$'if first else '')
        first=False
    #print( abs(sigmas[0][0].imag*wvs[0]/(sigmas[0][1].imag*wvs[1]) -1 )  )
    assert( abs(sigmas[0][0].imag*wvs[0]/(sigmas[0][1].imag*wvs[1]) -1 )<0.001  )
    ys.append(sigmas[0][0].imag*mu*wvs[0]*np.pi/2/Tc)
#pl.plot([wvs[0],wvs[-1]],[1,1],ls=':',c='k')
#pl.plot([wvs[0],wvs[-1]],[0,0],ls=':',c='k')
#printText([wvs[0],wvs[-1]],[1,1],0,5.,r'$\sigma=1$')
fig(0)
pl.plot(Trs,ys,c='k',ls='-')
pl.ylim(0,max(ys)*1.1)
pl.xlabel(r'$\frac{T}{T_c}$')
pl.ylabel(r'$\frac{\sigma_s}{T_c}$')
saveFig('cond_delta')
pl.show()
Ejemplo n.º 16
0
			if r==1:
				pl.plot(xs, cf(SlargeNf(Nfs[j],xs)),color=colors[j],linestyle='--')
		pl.plot(xs, cf([Squenchedv1(w,kx) for w in xs]),label=(r'$N_fk_f=0$' if i==0 else ''),color='black')
	pl.plot([],[],label=r'$k_x/\lambda^2='+wss+'$',color='white')
	pl.xlim([-wm,wm])
	if r==1:
		pl.ylim([-.11, .11])
	else:
		pl.ylim([-0,.09])
	grid_selfmade(f.get_axes()[0])

	pl.legend(loc=4)
	pl.xlabel(r'$\omega/\lambda^2$')
	pl.ylabel(r'$\mathrm{'+['Re','Im'][r]+'}(\Sigma(\omega, k_x))/\lambda^2$')

	saveFig(['re','im'][r]+'_Sigma_vs_omega_L='+str(L))

for r in [0,1]:
	f=fig(2+r,size=14)
	for i in range(len(ws)):
		w=ws[i]
		cf=[np.real,np.imag][r]
		for j in range(len(Nfs)):
			pl.plot(xs, [cf(Ss[j](w,x)) for x in xs],label='$N_fk_f='+str(Nfs[j])+r'\lambda^2$' if i==0 else '',color=colors[j])
			#iif r==1:
			#	pl.plot([-wm,wm], 2*[cf(SlargeNf(Nfs[j],w))],color=colors[j],linestyle='--')
		pl.plot(xs, cf([Squenchedv1(w,kx) for kx in xs]),label=(r'$N_fk_f=0$' if i==0 else ''),color='black')
	pl.plot([],[],label=r'$\omega/\lambda^2='+wss+'$',color='white')
	pl.xlim([-wm,wm])
	if r==0:
		pl.ylim([-.11, .11])
Ejemplo n.º 17
0
for osci in range(len(mu)):
    sign=-1 if O[osci][0]<0 else 1
    Tc=T/cConst*const[osci]
    fig(1)
    pl.plot(cConst/const[osci],np.sqrt(sign*O[osci]*np.sqrt(2))/Tc,ls='-' if sign==1 else '--',c='k')
    fig(2)
    pl.plot(cConst/const[osci],mu[osci]/Tc,ls='-' if sign==1 else '--',c='k')
    print O[osci]

fig(1)
pl.plot([0,1.2],[0,0],lw=1)
pl.ylim([-1,9])
#pl.legend(loc='upper right')
pl.xlabel(r'$\frac{T}{T_c}$')
pl.ylabel(r'$\frac{\sqrt{\sqrt{2}|\langle\mathcal{O}\rangle|}}{T_c}$')
saveFig('O_constRho_a2_'+str(a2))

fig(2)
Trs=np.linspace(0,1.2)[1:]
#pl.plot(Trs,rho*zh/Tc,lw=1)
pl.plot(Trs,min([min(r) for r in rho])*(zh/Trs)/T,lw=1)
#pl.plot(Trs,Trs*7.71285,ls=':')
pl.ylim([0,50])
#pl.legend(loc='upper right')
pl.xlabel(r'$\frac{T}{T_c}$')
pl.ylabel(r'$\frac{\mu}{T_c}$')
saveFig('mu_constRho_a2_'+str(a2))

pl.show()
Ejemplo n.º 18
0
    rho=-bb[1][1]
    mu=bb[1][0]
    y2s.append(m/d*Tc)
#drude=1/(d-m*1j*w)
fig(0)
pl.xscale('log')
pl.yscale('log')
pl.plot([a2 for a2 in a2s],y1s,ls='-',c='k',label=r'$\sigma_0$')
pl.plot(a2s,y2s,ls='--',c='k',label=r'$\tau T_c$')
hn=len(a2s)/3.5
k=np.log(y1s[-1]/y1s[-2])/np.log(a2s[-1]/a2s[-2])
m=y1s[-1]/a2s[-1]**k
print(k)
print(m)
pl.plot([a2s[hn], a2s[-1]], [a2s[hn]**k*m, a2s[-1]**k*m],ls='--',c='r')#,label=r'$\mathrm{Power\ fit}$')
pl.annotate(r'$C\left(\frac{\alpha_2}{L^4}\right)^{'+('%.3f'%k)+'}$',xy=(a2s[hn],a2s[hn]**k*m), xycoords='data',
                                  xytext=(-70, -14), textcoords='offset points', fontsize=10,
                                                                     arrowprops=dict(arrowstyle="->"))

'''k=np.log(y2s[-1]/y2s[-2])/np.log(a2s[-1]/a2s[-2])
m=y2s[-1]/a2s[-1]**k
print(k)
print(m)
pl.plot([a2s[hn], a2s[-1]], [a2s[hn]**k*m, a2s[-1]**k*m],ls='-',c='b')#,label=r'$\mathrm{Power\ fit}$')'''
pl.xlabel(r'$\frac{\alpha_2}{L^4}$')
ai=50
pl.legend(loc='upper left')
pl.xlim(a2s[0],a2s[-1])
saveFig('drudeVara2_T='+str(Tr)+'Tc')
pl.show()
Ejemplo n.º 19
0
ws=np.logspace(-3,3,200)
sigmas=[]
for i in range(len(ws)):
    printRatio(i,len(ws))
    bb,osc=getBoundary(hphi,0,[Tc*ws[i],a2])
    assert osc==0
    sigmas.append(-1j*bb[2][1]/( bb[2][0]*(Tc*ws[i]) ))
d=1/sigmas[0].real
m=sigmas[0].imag/(Tc*ws[0])*d**2
drude=1/(d-m*1j*(Tc*ws))
fig(0)
pl.plot(ws,[s.real for s in sigmas],c='k',label=r'$\mathrm{AdS-CFT}$')
pl.plot(ws,[s.real for s in drude],c=[1.0,0.,0.],ls='--',label=r'$\mathrm{Drude}$')
pl.plot(ws,[s.imag for s in sigmas],c='k')
pl.plot(ws,[s.imag for s in drude],ls='--',c=[1.,0.,0.])
pl.xlabel(r'$\frac{\omega}{T_c}$')
pl.ylabel(r'$\sigma$')
pl.xscale('log')
ai=50
pl.annotate(r'$\mathrm{Re}(\sigma)$',xy=(ws[ai],sigmas[ai].real), xycoords='data',
                          xytext=(-45, -25), textcoords='offset points', fontsize=10,
                                   arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=.2"))

pl.annotate(r'$\mathrm{Im}(\sigma)$',xy=(ws[ai],sigmas[ai].imag), xycoords='data',
                          xytext=(-45, 25), textcoords='offset points', fontsize=10,
                                   arrowprops=dict(arrowstyle="->", connectionstyle="arc3,rad=-.2"))

pl.legend()
saveFig('drude_2Tc_a21')
pl.show()