Пример #1
0
def qite_plot(RR,TT,EE,FF,FCI,xrng,yrng,fname):
 x0        = 7.00
 xfig      = 1.00*2*x0
 yfig      = 0.75*1*x0

 fig,pan = plt.subplots(1,2,figsize=(xfig,yfig))

 for js in range(2):
  pan[js].get_xaxis().set_tick_params(which='both',direction='in',labelsize=18)
  pan[js].get_yaxis().set_tick_params(which='both',direction='in',labelsize=18)

 pan[0].set_xlabel(r'$\displaystyle{\beta}$',fontsize=18)
 pan[0].set_ylabel(r'$\displaystyle{E(\beta)}$',fontsize=18)
 pan[0].set_xlim(xrng[0])
 pan[0].set_ylim(yrng[0])

 pan[1].set_xlabel(r'$\displaystyle{\beta}$',fontsize=18)
 pan[1].set_ylabel(r'$\displaystyle{|\langle \Psi_{0} | \Psi_\beta \rangle|}$',fontsize=18) 
 pan[1].set_xlim(xrng[1])
 pan[1].set_ylim(yrng[1])

 for ip in range(2):
  u = np.arange(round(np.min(xrng[ip])),round(np.max(xrng[ip])),0.05)
  v = [FCI[ip]]*len(u)
  st.Palette[st.fci].dataplot(pan[ip],u,v,spline=True,connected=False)

 for jR in range(len(Rlst)):
  Lx = np.max(xrng[0])-np.min(xrng[0])
  Ly = np.max(yrng[0])-np.min(yrng[0])
  mask = st.equidistant_points(TT[:,jR],Lx,EE[:,jR],Ly*3.0,0.015)
  st.Palette[jR].dataplot(pan[0],TT[mask,jR],EE[mask,jR]    ,spline=True ,connected=False)
  st.Palette[jR].dataplot(pan[0],TT[mask,jR],EE[mask,jR]    ,spline=False,connected=False)
  st.Palette[jR].dataplot(pan[0],TT[mask,jR],EE[mask,jR]-5e3,spline=False,connected=True)

  Lx = np.max(xrng[1])-np.min(xrng[1])
  Ly = np.max(yrng[1])-np.min(yrng[1])
  mask = st.equidistant_points(TT[:,jR],Lx,FF[:,jR],Ly*3.0,0.015)
  pt0,ps0                             = st.Palette[jR].pt,st.Palette[jR].ps
  st.Palette[jR].pt,st.Palette[jR].ps = '.',0
  st.Palette[jR].dataplot(pan[1],TT[:,jR],FF[:,jR]    ,spline=False,connected=True)
  st.Palette[jR].pt,st.Palette[jR].ps = pt0,ps0
  st.Palette[jR].dataplot(pan[1],TT[mask,jR],FF[mask,jR]    ,spline=False,connected=False)
  st.Palette[jR].dataplot(pan[1],TT[mask,jR],FF[mask,jR]-5e3,spline=False,connected=True)

 x0 = -0.05
 dx =  2.30
 y0 =  1.00
 dy =  0.10
 order = [0]+[3*(x+1) for x in range(len(Rlst))]
 nord  = len(order)
 #order = order[:nord-1]
 lgd   = st.make_legend(pan[0],order,ncol=range(len(Rlst)),bbox_to_anchor=(x0,y0,dx,dy),\
         loc=3,mode="expand",borderaxespad=1,fontsize=18,handlelength=4,numpoints=2)

 fig.savefig(fname,format='eps',bbox_inches='tight')
 os.system('ps2epsi '+fname)
 os.system('mv '+fname+'i '+fname)
Пример #2
0
def qite_plot(RR, TT, EE, FF, FCI, xrng, yrng, fname):
    x0 = 7.00
    xfig = 1.00 * 1 * x0
    yfig = 0.75 * 1 * x0

    fig, pan = plt.subplots(1, 1, figsize=(xfig, yfig))

    pan.get_xaxis().set_tick_params(which='both', direction='in', labelsize=20)
    pan.get_yaxis().set_tick_params(which='both', direction='in', labelsize=20)

    pan.set_xlabel(r'$\displaystyle{\beta}$', fontsize=20)
    pan.set_ylabel(r'$\displaystyle{E(\beta)}$', fontsize=20)
    pan.set_xlim(xrng[0])
    pan.set_ylim(yrng[0])

    ip = 0
    u = np.arange(round(np.min(xrng[ip])), round(np.max(xrng[ip])), 0.05)
    v = [FCI[ip]] * len(u)
    st.Palette[st.fci].dataplot(pan, u, v, spline=True, connected=False)

    for jR in range(len(Rlst)):
        Lx = np.max(xrng[0]) - np.min(xrng[0])
        Ly = np.max(yrng[0]) - np.min(yrng[0])
        mask = st.equidistant_points(TT[:, jR], Lx, EE[:, jR], Ly * 3.0, 0.015)
        st.Palette[jR].dataplot(pan,
                                TT[mask, jR],
                                EE[mask, jR],
                                spline=True,
                                connected=False)
        st.Palette[jR].dataplot(pan,
                                TT[mask, jR],
                                EE[mask, jR],
                                spline=False,
                                connected=False)
        st.Palette[jR].dataplot(pan,
                                TT[mask, jR],
                                EE[mask, jR] - 5e3,
                                spline=False,
                                connected=True)

    plt.text(3.55, -2.05, r'$(a)$', fontsize=21)

    x0 = -0.04
    dx = 1.08
    y0 = 1.00
    dy = 0.10
    order = [0] + [3 * (x + 1) for x in range(len(Rlst))]
    lgd   = st.make_legend(pan,order,ncol=range(len(Rlst)),bbox_to_anchor=(x0,y0,dx,dy),\
            loc=3,mode="expand",borderaxespad=1,fontsize=14,handlelength=3,numpoints=2)

    fig.savefig(fname, format='eps', bbox_inches='tight')
    os.system('ps2epsi ' + fname)
    os.system('mv ' + fname + 'i ' + fname)
Пример #3
0
pan.set_ylabel(r'$\displaystyle{E(\beta) \, \big[\mathrm{E_{Ha}}\big]}$',
               fontsize=18)
pan.set_xlim([-0.2, 3.2])
pan.set_ylim([-1.2001, 0.2])

u = [R[nb * x] for x in range(nr)]
v = [E[nb - 1 + nb * x] for x in range(nr)]
st.Palette[st.fci].dataplot(pan, u, v, spline=False, connected=True)

mu = 16
for ib in [0, 100, 200, 300]:
    u = [R[nb * x] for x in range(nr)]
    v = [E[ib + nb * x] for x in range(nr)]
    st.Palette[mu].dataplot(pan, u, v, spline=False, connected=True)
    mu += 1

# figure label
plt.text(2.4, -0.03, r'$(d)$', fontsize=21)

x0 = -0.035
dx = 1.07
y0 = 1.00
dy = 0.10
order = [0, 1, 2, 3, 4]
lgd   = st.make_legend(pan,order,ncol=5,bbox_to_anchor=(x0,y0,dx,dy),\
        loc=3,mode="expand",borderaxespad=1,fontsize=13,handlelength=2.5,numpoints=2)

fig.savefig(fname, format='eps', bbox_inches='tight')
os.system('ps2epsi ' + fname)
os.system('mv ' + fname + 'i ' + fname)
Пример #4
0
def qite_plot(RR, TT, EE, FF, FCI, xrng, yrng, fname):
    x0 = 7.00
    xfig = 1.00 * 2 * x0
    yfig = 0.75 * 1 * x0

    fig, pan = plt.subplots(1, 2, figsize=(xfig, yfig))

    for js in range(2):
        pan[js].get_xaxis().set_tick_params(which='both',
                                            direction='in',
                                            labelsize=18)
        pan[js].get_yaxis().set_tick_params(which='both',
                                            direction='in',
                                            labelsize=18)

    pan[0].set_xlabel(r'$\displaystyle{\beta}$', fontsize=18)
    pan[0].set_ylabel(
        r'$\displaystyle{E_{QITE}(\beta)}, \, E_{Q-Lanz}(\beta)$', fontsize=18)
    pan[0].set_xlim(xrng[0])
    pan[0].set_ylim(yrng[0])

    pan[1].set_xlabel(r'$\displaystyle{\beta}$', fontsize=18)
    pan[1].set_ylabel(
        r'$\displaystyle{E_{QITE}(\beta)}, \, E_{Q-Lanz}(\beta)$', fontsize=18)
    pan[1].set_xlim(xrng[1])
    pan[1].set_ylim(yrng[1])

    for ip in range(2):
        u = np.arange(round(np.min(xrng[ip])), round(np.max(xrng[ip])), 0.05)
        v = [FCI[ip]] * len(u)
        st.Palette[st.fci].dataplot(pan[ip],
                                    u,
                                    v,
                                    spline=True,
                                    connected=False)

    ipan = 0
    for jR in range(len(Rlst)):
        kR = jR + 10
        Lx = np.max(xrng[0]) - np.min(xrng[0])
        Ly = np.max(yrng[0]) - np.min(yrng[0])
        mask = st.equidistant_points(TT[:, jR], Lx, EE[:, jR], Ly * 3.0, 0.015)
        st.Palette[jR].dataplot(pan[ipan],
                                TT[mask, jR],
                                EE[mask, jR],
                                spline=True,
                                connected=False)
        st.Palette[jR].dataplot(pan[ipan],
                                TT[mask, jR],
                                EE[mask, jR],
                                spline=False,
                                connected=False)
        st.Palette[jR].dataplot(pan[ipan],
                                TT[mask, jR],
                                EE[mask, jR] - 5e3,
                                spline=False,
                                connected=True)
        # for the legend
        st.Palette[jR].dataplot(pan[0],
                                TT[mask, jR],
                                EE[mask, jR] - 5e3,
                                spline=True,
                                connected=False)
        st.Palette[jR].dataplot(pan[0],
                                TT[mask, jR],
                                EE[mask, jR] - 5e3,
                                spline=False,
                                connected=False)
        st.Palette[jR].dataplot(pan[0],
                                TT[mask, jR],
                                EE[mask, jR] - 5e3,
                                spline=False,
                                connected=True)

        Lx = np.max(xrng[1]) - np.min(xrng[1])
        Ly = np.max(yrng[1]) - np.min(yrng[1])
        SS = [TT[2 * i, jR] for i in range(FF.shape[0])]
        SS = np.asarray(SS)
        mask = st.equidistant_points(SS, Lx, FF[:, jR], Ly * 3.0, 0.015)
        pt0, ps0 = st.Palette[kR].pt, st.Palette[kR].ps
        st.Palette[kR].pt, st.Palette[kR].ps = '.', 0
        st.Palette[kR].dataplot(pan[ipan],
                                SS,
                                FF[:, jR],
                                spline=False,
                                connected=True)
        st.Palette[kR].pt, st.Palette[kR].ps = pt0, ps0
        st.Palette[kR].dataplot(pan[ipan],
                                SS[mask],
                                FF[mask, jR],
                                spline=False,
                                connected=False)
        st.Palette[kR].dataplot(pan[ipan],
                                SS[mask],
                                FF[mask, jR] - 5e3,
                                spline=False,
                                connected=True)

        # for the legend
        st.Palette[kR].dataplot(pan[0],
                                SS,
                                FF[:, jR] - 5e3,
                                spline=False,
                                connected=True)
        st.Palette[kR].dataplot(pan[0],
                                SS[mask],
                                FF[mask, jR] - 5e3,
                                spline=False,
                                connected=False)
        st.Palette[kR].dataplot(pan[0],
                                SS[mask],
                                FF[mask, jR] - 5e3,
                                spline=False,
                                connected=True)

        ipan += 1

    x0 = -0.04
    dx = 2.28
    y0 = 1.002
    dy = 0.10
    order = [0, 3, 9, 15, 16]
    lgd = st.make_legend(pan[0],
                         order,
                         ncol=5,
                         bbox_to_anchor=(x0, y0, dx, dy),
                         loc=3,
                         mode="expand",
                         borderaxespad=1,
                         fontsize=17,
                         handlelength=3,
                         numpoints=2)

    fig.savefig(fname, format='eps', bbox_inches='tight')
    os.system('ps2epsi ' + fname)
    os.system('mv ' + fname + 'i ' + fname)
Пример #5
0
def qite_plot(RR,TT,EE,FF,FCI,xrng,yrng,gamma,fname):
 x0        = 7.00
 xfig      = 1.00*1*x0
 yfig      = 0.75*1*x0

 fig,pan = plt.subplots(1,1,figsize=(xfig,yfig))

 pan.get_xaxis().set_tick_params(which='both',direction='in',labelsize=18)
 pan.get_yaxis().set_tick_params(which='both',direction='in',labelsize=18)

 '''
 pan.set_xlabel(r'$\displaystyle{\beta}$',fontsize=14)
 pan.set_ylabel(r'$\displaystyle{C(\beta)}$',fontsize=14)
 pan.set_xlim(xrng[0])
 pan.set_ylim(yrng[0])
 '''

 pan.set_xlabel(r'$\displaystyle{\beta}$',fontsize=18)
 pan.set_ylabel(r'$P(C=C_{max})$',fontsize=18) 
 pan.set_xlim(xrng[1])
 pan.set_ylim(yrng[1])
 pan.set_yticks([0,0.2,0.4,0.6,0.8,1.0,1.2000000001],[r'$\displaystyle{\phantom{-}0.0}$',
                                             r'$\displaystyle{\phantom{-}0.2}$',
                                             r'$\displaystyle{\phantom{-}0.4}$',
                                             r'$\displaystyle{\phantom{-}0.6}$',
                                             r'$\displaystyle{\phantom{-}0.8}$',
                                             r'$\displaystyle{\phantom{-}1.0}$',
                                             r'$\displaystyle{\phantom{-}1.2]$'])

 #for ip in range(2):
 ip=1
 u = np.arange(0,16,0.1) #round(np.min(xrng[ip])),round(np.max(xrng[ip])),0.05)
 v = [FCI[ip]]*len(u)
 st.Palette[st.fci].dataplot(pan,u,v,spline=False,connected=True)

 for jR in range(len(Rlst)):
  '''
  Lx = np.max(xrng[0])-np.min(xrng[0])
  Ly = np.max(yrng[0])-np.min(yrng[0])
  mask = st.equidistant_points(TT[:,jR],Lx,EE[:,jR],Ly*3.0,0.01)
  st.Palette[jR].dataplot(pan[0],TT[   :,jR],EE[   :,jR]    ,spline=True ,connected=False)
  st.Palette[jR].dataplot(pan[0],TT[mask,jR],EE[mask,jR]    ,spline=False,connected=False)
  st.Palette[jR].dataplot(pan[0],TT[mask,jR],EE[mask,jR]-5e3,spline=False,connected=True)
  '''
  Lx = np.max(xrng[1])-np.min(xrng[1])
  Ly = np.max(yrng[1])-np.min(yrng[1])
  mask = st.equidistant_points(TT[:,jR],Lx,FF[:,jR],Ly*3.0,0.006)
  st.Palette[jR].dataplot(pan,TT[   :,jR],FF[   :,jR]    ,spline=False,connected=True)
  st.Palette[jR].dataplot(pan,TT[mask,jR],FF[mask,jR]    ,spline=False,connected=False)
  st.Palette[jR].dataplot(pan,TT[mask,jR],FF[mask,jR]-5e3,spline=False,connected=True)

 # graph inset

 from matplotlib.patches import Polygon
 ins      = plt.axes([0.48,0.10,0.40,0.40],aspect='equal')
 nv,E,cut = gamma

 ins.axis("off")
 ins.set_xlim([-1.2,1.2])
 ins.set_ylim([-1.2,1.2])
 u = np.linspace(-np.pi,np.pi,100)
 v = np.sin(u)
 u = np.cos(u)
 st.Palette[st.link].dataplot(ins,u, v,spline=False,connected=True)
 st.Palette[st.link].dataplot(ins,u,-v,spline=False,connected=True)

 for (iv,jv) in E:
  phii  = 2*np.pi*float(iv)/float(nv)
  phij  = 2*np.pi*float(jv)/float(nv)
  xi,xj = np.cos(phii),np.cos(phij)
  yi,yj = np.sin(phii),np.sin(phij)
  u     = np.linspace(xi,xj,10)
  v     = np.linspace(yi,yj,10)
  idx   = st.linkin
  print iv,jv,iv in cut,jv in cut
  if((iv in cut) and (not jv in cut)): idx = st.linkbtw
  if((jv in cut) and (not iv in cut)): idx = st.linkbtw
  st.Palette[idx].dataplot(ins,u,v,spline=False,connected=True)

 for iv in range(nv):
  if(iv in cut): idx = st.vertexin
  else:          idx = st.vertexout
  phi = 2*np.pi*float(iv)/float(nv)
  st.Palette[idx].dataplot(ins,[np.cos(phi)],[np.sin(phi)],spline=False,connected=False)

 # figure label
 plt.text(1.05,3.15,r'$(b)$',fontsize=21)

 x0 = -0.04
 dx =  1.08
 y0 =  1.002
 dy =  0.10
 order = [0]+[3*(x+1) for x in range(len(Rlst))]
 lgd   = st.make_legend(pan,order,ncol=range(len(Rlst)),bbox_to_anchor=(x0,y0,dx,dy),\
         loc=3,mode="expand",borderaxespad=1,fontsize=14,handlelength=3,numpoints=2)

 fig.savefig(fname,format='eps',bbox_inches='tight')
 os.system('ps2epsi '+fname)
 os.system('mv '+fname+'i '+fname)