import pylab as plt import TLL as tll import numpy as np ls, gs, corr = tll.dvrg(1.5, .5) plt.figure(1) plt.subplot(211) for g in gs: plt.plot(ls, np.absolute(g[0]), label=g[1], color=g[2]) plt.legend() plt.subplot(212) for cor in corr: plt.semilogy(ls, np.absolute(cor[0]), label=cor[1], color=cor[2]) plt.legend() xpnts = tll.tll(1.5, .5) plt.figure(2) plt.xlim([5, 20]) plt.ylim([0, .1]) for tup in xpnts: lst = tup[0] plt.plot(range(1, 20), map(lambda x: (1. / x)**(lst[-1]), range(1, 20)), label=tup[1], color=tup[2], marker=tup[3]) plt.legend() plt.show()
import pylab as plt import TLL as tll import numpy as np ls, gs, corr = tll.dvrg(1.5, .5) plt.figure(1) plt.subplot(211) for g in gs: plt.plot(ls, np.absolute(g[0]), label=g[1], color=g[2]) plt.legend() plt.subplot(212) for cor in corr: plt.semilogy(ls, np.absolute(cor[0]), label=cor[1], color=cor[2]) plt.legend() xpnts = tll.tll(1.5, .5) plt.figure(2) plt.xlim([5,20]) plt.ylim([0,.1]) for tup in xpnts: lst = tup[0] plt.plot(range(1,20), map(lambda x: (1./x)**(lst[-1]), range(1,20)), label=tup[1], color=tup[2], marker=tup[3]) plt.legend() plt.show()
for uzr in arange(0., 1., 1. / 10.): for upi in arange(1. + 1. / 10., 2. + 1. / 10., 1. / 10.): ls, g, corr = tll.dvrg(uzr, upi) tup = corr[-1] phase[(uzr, upi)] = tup[1:] for uzr in arange(1., 2. + 1. / 10., 1. / 10.): for upi in arange(1. + 1. / 10., 2. + 1. / 10., 1. / 10.): ls, g, corr = tll.dvrg(uzr, upi) tup = corr[-1] phase[(uzr, upi)] = tup[1:] for uzr in arange(1. + 1. / 10., 2. + 1. / 10., 1. / 10.): for upi in arange(0., 1., 1. / 10.): xpnt = tll.tll(uzr, upi) tup = xpnt[0] phase[(uzr, upi)] = tup[1:] # Partition the tuples into lists by (label, color, marker) for plotting in # groups. plots = [(filter(lambda x: phase[x] == val, phase), val) for val in list(set(phase.values()))] print plots #plt.rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) #plt.rc('text', usetex=True) plt.figure() plt.title(r'Phase Diagram of TLL Region') plt.xlabel(r'$\frac{U_0}{U}$')
for uzr in arange(0., 1., 1./10.): for upi in arange(1.+1./10., 2.+1./10., 1./10.): ls, g, corr = tll.dvrg(uzr,upi) tup = corr[-1] phase[(uzr,upi)] = tup[1:] for uzr in arange(1., 2.+1./10., 1./10.): for upi in arange(1.+1./10., 2.+1./10., 1./10.): ls, g, corr = tll.dvrg(uzr,upi) tup = corr[-1] phase[(uzr,upi)] = tup[1:] for uzr in arange(1.+1./10., 2.+1./10., 1./10.): for upi in arange(0., 1., 1./10.): xpnt = tll.tll(uzr,upi) tup = xpnt[0] phase[(uzr,upi)] = tup[1:] # Partition the tuples into lists by (label, color, marker) for plotting in # groups. plots = [(filter(lambda x: phase[x]==val, phase), val) for val in list(set(phase.values()))] print plots #plt.rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) #plt.rc('text', usetex=True) plt.figure() plt.title(r'Phase Diagram of TLL Region') plt.xlabel(r'$\frac{U_0}{U}$')