This file includes the graphic codes for the DOS data coming from the *NRG* code ($i$-files) and the exact green functions ('di' folders) written by *GreenFunctions.nb.*
In this file we define the functions to read the density of states from the output data of the NRG code. Functions:
The NRG configurations of the file parameters $i$ are detailed in the file GUIDE.txt.
Line parameter $l$, selection values:
And ...
Plot single dot functions for the output data from NRG and GreenFunctions.nb. Functions:
The functions here build n-level subplots that will be used to describe the final results.
Examples of plots produced with this method.
In [1]:
#Interactive plots
%pylab
# inline
import string
# import matplotlib.ticker as ticker
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
# from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes, mark_inset
import os
#%matplotlib qt
#%matplotlib notebook
#%matplotlib nbagg
#from __future__ import division
txt = 'run'
#txt = 'OldData/run'
txt2 = '/rho_'
inp ='/input_nrg.dat'
densPath = '/home/cifucito/nrgcode/TwoChNRG/Images/Density/run'
rcParams.update({'font.size': 30})
rc("text", usetex = True)
rc("font", family = "serif")
#rcParams['figure.subplot.hspace'] = 0.3
rcParams['figure.subplot.wspace'] = 0.1
from scipy.interpolate import griddata
from scipy.optimize import curve_fit
from scipy import interpolate
mpl.rcParams['lines.linewidth'] = 2
Gamma = 2.82691*0.01
print 'This is $\pi \Gamma$ ' + repr(pi*Gamma)
In [2]:
#The following functions read the NRG outputs
#read files for folder ini and dot
#Inputs: ini = 1 - 1000 , dot = 0,1,2,3,4
#return DOS - Density of states , w - energy
def readfile(ini, dot):
output = txt+repr(ini)+txt2 +repr(dot)+'_'+repr(dot)+'_OmegaRhow_zEQAVG.00.dat'
#output = txt+repr(ini)+txt2 +repr(dot)+'_'+repr(dot)+'_OmegaRhow.dat'
#output = 'NotSoOld_Data/'+txt+repr(ini)+txt2 +repr(dot)+'_'+repr(dot)+'_OmegaRhow.dat'
#output = 'OldData/'+txt+repr(ini)+txt2 +repr(dot)+'_'+repr(dot)+'_OmegaRhow.dat'
# dat = loadtxt(output, delimiter = ' ')
#Data managemente
infile = open(os.path.abspath(output), 'r')
text = infile.readlines()
vec = []; vec2 = []
for x in text:
#print(list(x))
a =x.split(' ') ; vec.append(float(a[-3]))
vec2.append(float(a[0]))
#if j%20 == 1 : vec = vec[::-1];
DOS= array(vec) ; w = array(vec2)
# DOS= dat[:,1] ; w = dat[:,0]
return DOS , w
#Given a line in the data file, readfile_Param returns the parameter value of file ini at the given line
#inputs : ini = 1 ... 1000 , line = 1-17
#return : float with the parameter of the line
def readfile_Param(ini, line):
#output = txt+repr(ini)+txt2 +repr(dot)+'_'+repr(dot)+'_OmegaRhow_zEQAVG.00.dat'
#output = '/home/cifucito/nrgcode/TwoChNRG/src/Main/Run/Run2DOtM/rho_2_2_OmegaRhow.dat'
output = txt+repr(ini)+ inp
infile = open(os.path.abspath(output), 'r')
text = infile.readlines()
return float(text[line])
#Read Math : Reads the data obtaind from the Green functions in Mathematica
# input: title of the data file from the di folders
# output w , DOS
def readMath( title):
LIMSX = 10 # Limit of the w values in the DOS
infile = open(os.path.abspath( title ), 'r')
text = infile.readlines()
Green = []
for x in text:
Green.append(pi*Gamma*float(x.split('\n')[0]))
#return linspace(-10,10,500), array(Green)/(pi*Gamma)
return linspace(-LIMSX,LIMSX,500), array(Green)
In [3]:
# PlotMath: Plot the data from the Green functions
# Input: ax-axis, title- title of the data file, lb -text in label ,
# col - color
def plotMath( ax , title , lb , style,col):
LIMSX = 10 # Limit of the w values in the DOS
w , Green = readMath( title)
Green = Green#/(pi*Gamma)
NLN = 4
if col == 'no':
if lb == '':
if col == 'b' or style == ':':
ax.plot(linspace(-LIMSX,LIMSX,500),Green, ls = style , linewidth=NLN)
else:
ax.plot(linspace(-LIMSX,LIMSX,500),Green, ls = style )
else :
if col == 'b' or style == ':':
ax.plot(linspace(-LIMSX,LIMSX,500),Green, label = lb,ls = style, linewidth=NLN)
else:
ax.plot(linspace(-LIMSX,LIMSX,500),Green, label = lb,ls = style)
else:
if lb == '':
if col == 'b'or style == ':' :
ax.plot(linspace(-LIMSX,LIMSX,500),Green, ls = style , color = col, linewidth=NLN)
else:
ax.plot(linspace(-LIMSX,LIMSX,500),Green, ls = style , color = col)
else :
if col == 'b' or style == ':':
ax.plot(linspace(-LIMSX,LIMSX,500),Green, label = lb,ls = style, color = col , linewidth=NLN)
else:
ax.plot(linspace(-LIMSX,LIMSX,500),Green, label = lb,ls = style, color = col)
# Plot NRG results of a particular dot
# Input: ax-axis, i (int)- file number, SUM(boolean) - Sum data with file i+10 ,
# Reverse (boolean)- Invert data
def plotOneDot(ax,i , dot , SUM , Reverse): #U=8.6 \Gamma_1
vec , w = readfile(i, dot)
NLN = 4
# if Reverse:
# vec = vec[::-1]
if SUM :
# IMPORTANT DETAIL. USE: 10 FOR NEWFILES
# 100 for Old files
Add = 100 if i > 400 else 10
rho , vec2 = readfile(i+Add, dot)
print 'sum' + repr(Add)
vec = 0.5*(rho+vec)
if Reverse:
vec = vec[::-1]
#vec = vec#*pi*Gamma#*Hib
spin = '\uparrow' if dot%2!=1 else '\downarrow'
ln = 'b-' if dot%2!=1 else 'r-'
if i == 450:
ln = 'k-'
#plot DOS
p0 = vec[w>0][0]
print p0*pi*Gamma*2
#plot(w/(Gamma*0.8),vec*pi*Gamma/0.944036503513, 'o',label= '$' +spin + '$')
if dot%2 == 0 :
ax.plot(w/Gamma,Gamma*pi*vec, ln,label= '$ ' +spin + '$' , linewidth=NLN)
# ax.plot(w,vec, ln,label= '$ ' +spin + '$' , linewidth=NLN)
else:
ax.plot(w/Gamma,Gamma*pi*vec, ln,label= '$ ' +spin + '$' )
# ax.plot(w,vec, ln,label= '$ ' +spin + '$' )
#plotOneDot(22 , 0)
#plotOneDot(22 , 1)
#plotOneDot(22 , 2)
#plotOneDot(22, 3)
#plot(linspace(-10*Gamma,10*Gamma,500),Green, label = 'Green')
#readMath('DQD')
#readMath('Gamma1=0.0282691,Gamma2=0,tdots=0.02,t1=0,t2=0.02')
#xlim(-20,20)
#legend(fontsize=17, loc='lower right')
# title = '/home/cifucito/nrgcode/TwoChNRG/Data/Green/Gamma1=2.,Gamma2=0.,tdots=0.,t1=5.,t2=0.,em=0.,e1=0.,e2=0..dat'
#readMath(title)
# Plot dot with spin-up and spin-down.
# Options: Plot insets INSET(boolean) IM= '' no image or file inset image
# Inputs ax-axis, num (int)- file number, SUM(boolean) - Sum data with file i+10 ,
# Reverse (boolean)- Invert data , dot - Dot number , IM- image file
def plotFullDot(ax, IM , num , dot , SUM , INSET, Reverse):
plotOneDot(ax, num , dot , SUM , Reverse)
#Eliminated to make another plot
plotOneDot(ax, num , dot+1 , SUM , Reverse)
# Print inset image
if IM!='':
w = "85%" ; h = "85%" ;pos = (0, 0.0, .3, 1.2)
axmod = inset_axes(ax, width=w, height=h, bbox_to_anchor=pos,loc=6, bbox_transform=ax.transAxes )
image = imread(IM, format='png') ; axmod.imshow(image)
axmod.set_frame_on(False) ; axmod.get_xaxis().set_visible(False) ; axmod.get_yaxis().set_visible(False)
# Print inset zoom
if INSET :
w = "30%" ; h = "30%" ; pos = (-0.08, 0.16, 1.1, 1.2)
axins = inset_axes(ax, width=w, height=h, bbox_to_anchor=pos,loc=7, bbox_transform=ax.transAxes )
plotOneDot(axins,num , dot , SUM , Reverse)
#Eliminated to make another plot
plotOneDot(axins,num , dot+1 , SUM , Reverse)
# Normal settings
axins.set_xlim(-1,1) ; axins.set_ylim(0,.3)
axins.set_xticks(arange(-1,1.1, step=1))
axins.set_yticks(arange(0,.3, step=.2))
setp(axins.get_xticklabels(), fontsize=23)
setp(axins.get_yticklabels(), fontsize=23)
# axins.set_xticks(arange(-0.7,0.9, step=.7))
# axins.set_yticks(arange(0,1.2, step=.5))
# axins.set_xlim(-1.1,1.1) ; axins.set_ylim(0,0.26)
# t1>0
# axins.set_ylim(0,0.03)
# axins.set_xlim(-0.11,0.11)
# axins.set_xticks(arange(-.1,.11, step=.2))
# axins.set_yticks(arange(0,0.032, step=.03))
# axins.set_xticks([])
# axins.set_yticks([])
# ax.set_xlabel('$\omega/ \Gamma_1$')
# ax.set_ylabel('$$\\rho \pi \Gamma_1 $')
return axins
In [4]:
#SuperPlot of Mathematica files. 6 plots in one shot
def Plot4Tits(axarr , G2 ,tdots,t1 ,t2 , lb ):
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,0)
plotMath(axarr[0,0],tits[1],'\uparrow' , '-', 'b')
plotMath(axarr[0,0],tits[0],'\downarrow', '-' , 'r')
plotMath(axarr[0,1],tits[3],' $ \uparrow$ ' + lb , '-', 'b')
plotMath(axarr[0,1],tits[2],' $\downarrow$ '+ lb , '-' , 'r')
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 5 ,0)
plotMath(axarr[1,0],tits[1],'\uparrow' , '-', 'b')
plotMath(axarr[1,0],tits[0],'\downarrow', '-' , 'r')
plotMath(axarr[1,1],tits[3],' $ \uparrow$ ' + lb , '-', 'b')
plotMath(axarr[1,1],tits[2],' $\downarrow$ '+ lb , '-' , 'r')
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,-5)
plotMath(axarr[2,0],tits[1],'\uparrow' , '-', 'b')
plotMath(axarr[2,0],tits[0],'\downarrow', '-' , 'r')
plotMath(axarr[2,1],tits[3],' $ \uparrow$ ' + lb , '-', 'b')
plotMath(axarr[2,1],tits[2],' $\downarrow$ '+ lb , '-' , 'r')
return axarr
#SuperPlot of Mathematica files. 6 plots in one shot. More flexibility and inner for.
def PlotNewARR(axarr , lb ):
lt = [':','--','-']
G2 = 0 ; tdots = 0 ; t1 = 0 ; t2 = 0
for n in range(3):
Gvec = [0,1,2] ; G2 = Gvec[n]
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,0)
print "G2 =" + repr(G2) + ', tdots =' +repr(tdots) + ', t1 =' +repr(t1) + ', t2 =' + repr(t2)
plotMath(axarr[0,0],tits[1],'' , lt[n], 'no')
#plotMath(axarr[0,0],tits[0],'', '-' , 'no')
plotMath(axarr[0,1],tits[3],'$\Gamma_2 = ' + repr(G2) + '\Gamma_1$', lt[n], 'no')
#plotMath(axarr[0,1],tits[2],' $\downarrow$ '+ lb , '-' , 'no')
G2 = 0 ; tdots = 0 ; t1 = 0 ; t2 = 0
for n in range(3):
tdvec = [0,1,2] ; tdots = tdvec[n]
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,0)
print "G2 =" + repr(G2) + ', tdots =' +repr(tdots) + ', t1 =' +repr(t1) + ', t2 =' + repr(t2)
plotMath(axarr[1,0],tits[1],'' , lt[n], 'no')
# plotMath(axarr[0,0],tits[0],'', '-' , 'r')
plotMath(axarr[1,1],tits[3],'$t_{dots} = ' + repr(tdots) + '\Gamma_1$' , lt[n], 'no')
# plotMath(axarr[0,1],tits[2],' $\downarrow$ '+ lb , '-' , 'r')
G2 = 1 ; tdots = 0 ; t1 = 0 ; t2 = 0
for n in range(3):
tdvec = [0,1,3] ; tdots = tdvec[n]
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,0)
print "G2 =" + repr(G2) + ', tdots =' +repr(tdots) + ', t1 =' +repr(t1) + ', t2 =' + repr(t2)
plotMath(axarr[2,0],tits[1],'' , lt[n], 'no')
# plotMath(axarr[0,0],tits[0],'', '-' , 'r')
plotMath(axarr[2,1],tits[3],'$t_{dots} = ' + repr(tdots) + '\Gamma_1$' , lt[n], 'no')
# plotMath(axarr[0,1],tits[2],' $\downarrow$ '+ lb , '-' , 'r')
#After printing a 6- multiplot file, DrawInsets prints three called images in the indicated column. Used to print Majorana Models
def DrawInsets(axarr , column , im1 , im2 , im3):
# w = "50%"
# h = "40%"
# pos = (0, 0, 1.2, 1.25)
pos = (0, 0, 1.31, 1.25)
pos2 = (0, 0, 1.25, 1.25)
w = "60%"
h = "50%"
axins0 = inset_axes(axarr[0,column], width=w, height=h, bbox_to_anchor=pos,loc=7, bbox_transform=axarr[0,column].transAxes )
axins0.set_frame_on(False)
axins0.get_xaxis().set_visible(False)
axins0.get_yaxis().set_visible(False)
pos = pos2
axins1 = inset_axes(axarr[1,column], width=w, height=h, bbox_to_anchor=pos,loc=7, bbox_transform=axarr[1,column].transAxes )
axins1.set_frame_on(False)
axins1.get_xaxis().set_visible(False)
axins1.get_yaxis().set_visible(False)
axins2 = inset_axes(axarr[2,column], width=w, height=h, bbox_to_anchor=pos,loc=7, bbox_transform=axarr[2,column].transAxes )
axins2.set_frame_on(False)
axins2.get_xaxis().set_visible(False)
axins2.get_yaxis().set_visible(False)
image = imread(im1, format='png')
axins0.imshow(image)
image = imread(im2, format='png')
axins1.imshow(image)
image = imread(im3 , format='png')
axins2.imshow(image)
# image = imread('D3.png')
# axins0.imshow(image)
# image = imread('D2.png')
# axins1.imshow(image)
# image = imread('D1.png')
# axins2.imshow(image)
#axins.set_visible(False)
# , bbox_to_anchor=(0.4,0.1)
# axins = axarr[2,1].inset_axes([0.5, 0.5, 0.47, 0.47])
# Defines the titles of the data to plot acording to the data parameters . Green Functions.nb
# Inputs: G2 -Gamma2 , tdots, t1, t2 , em, e1 , e2 ---- Only integer values are admited. Gamma1 is the unit
# Returs: title with the data for every dot
def DefineTitles(G2 ,tdots,t1 ,t2 ,em, e1 ,e2):
title1 = 'd1/Gamma1=2.,Gamma2='+repr(int(G2*2) ) +'.,tdots='+repr(int(tdots*2))+'.,t1='+repr(int(2*t1))+'.,t2='+ repr(int(2*t2))+'.,em='+repr(int(2*em))+'.,e1='+repr(int(2*e1))+'.,e2='+repr(int(2*e2))+'..dat'
title2 = 'd2/Gamma1=2.,Gamma2='+repr(int(G2*2) ) +'.,tdots='+repr(int(tdots*2))+'.,t1='+repr(int(2*t1))+'.,t2='+ repr(int(2*t2))+'.,em='+repr(int(2*em))+'.,e1='+repr(int(2*e1))+'.,e2='+repr(int(2*e2))+'..dat'
title3 = 'd3/Gamma1=2.,Gamma2='+repr(int(G2*2) ) +'.,tdots='+repr(int(tdots*2))+'.,t1='+repr(int(2*t1))+'.,t2='+ repr(int(2*t2))+'.,em='+repr(int(2*em))+'.,e1='+repr(int(2*e1))+'.,e2='+repr(int(2*e2))+'..dat'
title4 = 'd4/Gamma1=2.,Gamma2='+repr(int(G2*2) ) +'.,tdots='+repr(int(tdots*2))+'.,t1='+repr(int(2*t1))+'.,t2='+ repr(int(2*t2))+'.,em='+repr(int(2*em))+'.,e1='+repr(int(2*e1))+'.,e2='+repr(int(2*e2))+'..dat'
return title1 , title2, title3 , title4
# Uses the titles from DefineTitles to plot a 4-subplot with the data from Green Functions.nb.
def Plot2Tits(axarr , G2 ,tdots,t1 ,t2 ,em, e1 ,e2 , lb):
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,em, e1 ,e2)
plotMath(axarr[0],tits[1],'' , '-', 'b')
plotMath(axarr[0],tits[0],'', '--' , 'r')
plotMath(axarr[1],tits[3],' $ \uparrow$ ' + lb , '-', 'b')
plotMath(axarr[1],tits[2],' $\downarrow$ '+ lb , '--' , 'r')
In [38]:
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7.5, 6.5))
plotFullDot(ax,'', 335 , j*2 , True, False , False)
In [10]:
#SuperPlot of Mathematica files. 6 plots in one shot
numRows = 3
numCols = 2
# t1>0
# num = [350 , 356, 366]
# t2>0
num = [370 , 376, 384]
#t1=t2
# num = [330 , 335, 335]
rcParams['figure.subplot.wspace'] = 0.04
rcParams['figure.subplot.hspace'] = 0.1
rcParams['figure.subplot.bottom'] = 0.14
rcParams['figure.subplot.right'] = 0.98
rcParams['figure.subplot.left'] = 0.18
rcParams['figure.subplot.top'] = 0.92
#f, axarr = subplots(numRows, numCols, sharex='col', sharey='row', figsize=(7, 5))
f, axarr = subplots(numRows, numCols, sharex='col', sharey='row', figsize=(7.5, 6.5))
for i in range(numRows):
for j in range(numCols):
print i, j
if (i == 0) & (j == 1) :
print i , j
plotFullDot(axarr[i,j],'', num[i] , j*2 , False, True , False)
# plotFullDot(axarr[i,j],'', num[i] , j*2 , False, False , False)
else:
if i < 2 :
plotFullDot(axarr[i,j],'', num[i] , j*2 , False, False , False)
else:
plotFullDot(axarr[i,j],'', num[i] , j*2 , False, False , True)
axarr[2,j].set_xlabel('$\omega/ \Gamma_1$')
axarr[i,0].set_ylabel('$$\\rho \pi \Gamma_1 $')
# t1 = t2
# if i == 0 :
# plotFullDot(axarr[i,j],'', num[i] , j*2 , True, False , False)
# elif i == 1:
# plotFullDot(axarr[i,j],'', num[i] , 2 - j*2 , True, False , False)
# else:
# plotFullDot(axarr[i,j],'', num[i] , j*2 , True, False , True)
# t1=t2
# axarr[i,j].set_xlim(-3,3)
# axarr[i,j].set_ylim(0,0.45)
# axarr[i,0].set_yticks(arange(0,0.45, step=0.2))
# axarr[0,j].set_ylim(0,0.3)
# axarr[0,0].set_yticks(arange(0,0.25, step=.2))
# t1>0
# axarr[i,j].set_xlim(-3,3)
# axarr[0,j].set_ylim(0,0.3)
# axarr[1,j].set_ylim(0,0.6)
# axarr[2,j].set_ylim(0,0.6)
# axarr[0,0].set_yticks(arange(0,0.3, step=.2))
# axarr[1,0].set_yticks(arange(0,0.6, step=.5))
# axarr[2,0].set_yticks(arange(0,0.6, step=0.5))
# t2>0
axarr[i,j].set_xlim(-3,3)
axarr[0,j].set_ylim(0,0.6)
axarr[1,j].set_ylim(0,0.6)
axarr[2,j].set_ylim(0,0.6)
axarr[0,0].set_yticks(arange(0,0.6, step=.5))
axarr[1,0].set_yticks(arange(0,0.6, step=.5))
axarr[2,0].set_yticks(arange(0,0.6, step=0.5))
axarr[0,0].set_title('Dot 1')
axarr[0,1].set_title('Dot 2')
for num,b in enumerate(('(a)', '(b)', '(c)', '(d)', '(e)','(f)')):
print num/2 , num%2 , b
axarr[num/2,num%2].text(0.05, 0.9, b, transform=axarr[num/2,num%2].transAxes, fontweight='bold', va='top')
rcParams.update({'figure.figsize': (500,500)})
# t1=t2
# DrawInsets(axarr, 0 , 'D3.png' , 'D2V1.png' , 'D1V2.png')
# t2>0
DrawInsets(axarr, 0 , 'D3.png' , 'D1V1.png' , 'D3V2.png')
# t1>0
# DrawInsets(axarr, 0 , 'D2.png' , 'D1V1.png' , 'D1V2.png')
#for i in range(3):
axarr[1,1].legend(fontsize=17, loc='upper right')
Out[10]:
In [7]:
# Plot nice Kondo
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7, 5))
cols = ['g' , 'k' , 'r']
lines = ['-' , '--' , ':']
for i in range(135,138):
rho , w = readfile(i,0)
vec = rho[::-1]
rho = .5*(vec+rho)
Gam = readfile_Param(ini=i, line=3)
U = readfile_Param(ini=i, line=2)
rho = rho
w = w/Gam
ax.plot(w, rho , label = '$U = '+ repr(U)+'$', color = cols[i-135] , linestyle = lines[i-135])
axvline(x= 4*Gam/U , color = cols[i-135], linestyle = lines[i-135])
ax.legend()
# plotOneDot(ax,135 , 0, True ,True)
# plotOneDot(ax,136 , 0, True ,True)
# plotOneDot(ax,137 , 0, True ,True)
# ax.set_xlabel('$\omega$',fontsize=50)
# ax.set_ylabel('$\\rho$',fontsize=50)
# ax.set_xticks([])
# ax.set_yticks([])
Out[7]:
In [ ]:
In [8]:
f, ax= subplots(1, 1, sharex='col',figsize=(7.5, 6.5))
plotOneDot(ax, 101 , 0 , False)
plotOneDot(ax, 101 , 1 , False)
w = "35%"
h = "35%"
pos = (0, 0, 1.03, 1.3)
axins = inset_axes(ax, width=w, height=h, bbox_to_anchor=pos,loc=7, bbox_transform=ax.transAxes )
plotOneDot(axins,101 , 0, False)
plotOneDot(axins,101 , 1, False)
# axins.set_frame_on(False)
# axins.get_xaxis().set_visible(False)
# axins.get_yaxis().set_visible(False)
ax.set_ylim(0,1.05)
ax.set_xlim(-12,12)
axins.set_xlim(-0.8,0.8)
ax.set_yticks(arange(0,1.2, step=.5))
axins.set_xticks(arange(-0.7,0.9, step=.7))
axins.set_yticks(arange(0,1.2, step=.5))
pos = (0, 0, 1.03, 1.3)
axmod = inset_axes(ax, width=w, height=h, bbox_to_anchor=pos,loc=6, bbox_transform=ax.transAxes )
image = imread('QD1.png', format='png') ; axmod.imshow(image)
axmod.set_frame_on(False) ; axmod.get_xaxis().set_visible(False) ; axmod.get_yaxis().set_visible(False)
In [18]:
# Plot nice Kondo
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7, 5))
plotOneDot(ax,100 , 1, False,False)
ax.set_xlabel('$\omega$',fontsize=50)
ax.set_ylabel('$\\rho$',fontsize=50)
ax.set_xticks([])
ax.set_yticks([])
Out[18]:
In [40]:
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7, 5))
plotFullDot(ax, 'DQD.png', 450 , 0 , False , True , False)
#plotFullDot(ax, 'QD1.png', 365 , 1 , False , True , False)
rcParams['figure.subplot.bottom'] = 0.19
rcParams['figure.subplot.right'] = 0.97
rcParams['figure.subplot.left'] = 0.2
rcParams['figure.subplot.top'] = 0.95
# plotFullDot(ax, 'MQD.png', 115 , 0 , False , True , False)
# ax.set_ylim(0,1); ax.set_xlim(-12,12)
# ax.set_yticks(arange(0,1.2, step=.5))
# ax.set_ylim(0,.26); ax.set_xlim(-12,12)
# ax.set_yticks(arange(0,.3, step=.2))
# ax.set_xlim(-0.5,0.5)
#ax.set_yticks(arange(0,31, step=.1))
ax.set_ylim(0,1); ax.set_xlim(-12,12)
# ax.set_yticks(arange(0,.3, step=.2))
rcParams.update({'figure.figsize': (200,200)})
ax.set_xlabel('$\omega/ \Gamma_1$')
ax.set_ylabel('$\\rho_1 \pi \Gamma_1 = \\rho_2 \pi \Gamma_1 $')
ax.set_ylabel('$\\rho \pi \Gamma_1$')
# ax.axvline(x=8.8435)
# ax.axvline(x=-8.8435)
#ax.legend(fontsize=23 , loc='upper left')
#plotFullDot(ax, 'QD1.png', 101 , 0 , False)
Out[40]:
In [9]:
# Plot extrange case
# Here
f, ax = subplots(2, 1, sharex='col', figsize=(4, 6))
rcParams['figure.subplot.bottom'] = 0.19
rcParams['figure.subplot.right'] = 0.97
rcParams['figure.subplot.left'] = 0.2
rcParams['figure.subplot.top'] = 0.95
axins1 = plotFullDot(ax[0], 'DQD.png', 450 , 0 , True , True , False)
axins2 = plotFullDot(ax[1], 'DQDM.png', 330 , 2 , True , True , False)
ax[0].set_ylim(0,.3); ax[0].set_xlim(-10,10) ; ax[1].set_xlim(-10,10) ; ax[1].set_ylim(0,.3)
ax[1].set_xlabel('$\omega/ \Gamma_1$') #; ax[1].set_xlabel('$\omega/ \Gamma_1$')
ax[0].set_yticks(arange(0,.3, step=.1))
ax[1].set_yticks(arange(0,.3, step=.1))
ax[0].set_xticks(arange(-8,8.1, step=4))
ax[1].set_xticks(arange(-8,8.1, step=4))
lab = '$\\rho_{1(2)}\ (\pi \Gamma_1) $'
ax[0].set_ylabel(lab) ; ax[1].set_ylabel(lab)
# ax[0].set_title('$t_1 = t_2 = 0$')
# ax[1].set_title('$t_1 = t_2 = 2\Gamma_1$')
line = 3.46*Gamma/.5
c = 'g'
ax[0].axvline(x=-line , linestyle = '--' , label = '$\omega = \pm 4*\Gamma^2/U$', color = c )
ax[0].axvline(x=line , linestyle = '--', color = c)
axins1.axvline(x=-line, linestyle = '--', color = c)
axins1.axvline(x=line , linestyle = '--', color = c)
line = 8*Gamma/.5
ax[1].axvline(x=-line , linestyle = '-.',label = '$\omega = \pm 8*\Gamma^2/U$', color = c )
ax[1].axvline(x=line , linestyle = '-.', color = c)
axins2.axvline(x=-line, linestyle = '-.', color = c)
axins2.axvline(x=line , linestyle = '-.', color = c)
#ax[1].legend(fontsize=20, loc='upper left')
#ax[0].legend(fontsize=20, loc='upper left')
Out[9]:
In [16]:
# Plot extrange case
# Here
f, ax = subplots(1, 2, sharex='col', sharey='row', figsize=(8, 3))
rcParams['figure.subplot.bottom'] = 0.19
rcParams['figure.subplot.right'] = 0.97
rcParams['figure.subplot.left'] = 0.2
rcParams['figure.subplot.top'] = 0.95
plotFullDot(ax[0], 'IND.png', 410 , 0 , True , False , False)
plotFullDot(ax[1], '', 410 , 2 , True , True , False)
ax[0].set_ylim(0,.8); ax[0].set_xlim(-1,1) ; ax[1].set_xlim(-1,1)
ax[0].set_xlabel('$\omega/ \Gamma_1$') ; ax[1].set_xlabel('$\omega/ \Gamma_1$')
ax[0].set_ylabel('$\\rho \pi \Gamma_1 $')
ax[0].set_title('Dot 1')
ax[1].set_title('Dot 2')
ax[1].legend(fontsize=20, loc='upper left')
Out[16]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [6]:
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7, 5))
rcParams['figure.subplot.bottom'] = 0.19
rcParams['figure.subplot.right'] = 0.97
rcParams['figure.subplot.left'] = 0.2
rcParams['figure.subplot.top'] = 0.95
plotFullDot(ax, 'DQDM.png', 451 , 0 , True , True , False)
ax.set_ylim(0,.25); ax.set_xlim(-.5,.5)
ax.set_xlabel('$\omega/ \Gamma_1$')
ax.set_ylabel('$\\rho_1 \pi \Gamma_1 = \\rho_2 \pi \Gamma_1 $')
Out[6]:
In [ ]:
In [10]:
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7, 5))
plotFullDot(ax, 'DQDM.png',131 , 0 , False , True , False)
Out[10]:
In [8]:
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(7, 5))
plotFullDot(ax, 'DQDM.png',130 , 0 , False , True , False)
In [ ]:
In [ ]:
In [8]:
f, axarr = subplots(1, 2, sharex='col', sharey='row', figsize=(9, 4))
G2 = 0 ; tdots = 0 ; t1 = 0 ; t2 = 0 ; em = 0 ; e1 = 0 ;e2 = 0
for G2 in array([0,0.5,1,4]):
Plot2Tits(axarr , G2 ,tdots,t1 ,t2 ,em, e1 ,e2 , '$\Gamma_2 ='+repr(G2)+'\Gamma_1$')
#for tdots in array([1,2,4]):
# Plot2Tits(axarr , 0 ,tdots,t1 ,t2 ,em, e1 ,e2 , '$t_{dots}='+repr(tdots)+'\Gamma_1$')
#
#plotMath(axarr[0],tits[1],'Spin-$\uparrow$', '-')
#plotMath(axarr[1],tits[3],'Spin-$\uparrow$', '-')
#for t1 in array([1,2,3.5]):
# Plot2Tits(axarr , 0 ,1,t1 ,t2 ,em, e1 ,e2 , '$t_{1}='+repr(t1)+'\Gamma_1$')
#
#for t2 in array([1,2,3.5]):
# Plot2Tits(axarr , 0 ,1,t1 ,t2 ,em, e1 ,e2 , '$t_{2}='+repr(t2)+'\Gamma_1$')
#
G2 = 0 ; tdots = 0 ; t1 = 0 ; t2 = 0 ; em = 0 ; e1 = 0 ;e2 = 0
#for G2 in array([0,0.5,1,4]):
#Plot2Tits(axarr , G2 ,1, 0,2 ,em, 0 , 0 , '')
#Plot2Tits(axarr , G2 ,1, 2,0 ,em, 0 , 5 , '')
Plot2Tits(axarr , 1 ,0, 1,1 ,em, 0 , 6 , '')
axarr[0].set_ylim(0,12)
axarr[0].set_xlim(-LIMSX,LIMSX)
axarr[1].set_xlim(-LIMSX,LIMSX)
axarr[0].set_title('Dot 1')
axarr[1].set_title('Dot 2')
axarr[0].set_xlabel('$\omega/ \Gamma_1$')
axarr[1].set_xlabel('$\omega/ \Gamma_1$')
axarr[0].set_ylabel('DOS')
axarr[1].legend(fontsize=18 , loc='upper right' )
axarr[0].set_xticks((-8,-4,0,4,8))
axarr[1].set_xticks((-8,-4,0,4,8))
axarr[0].set_yticks((0,5,10))
In [8]:
axarr[1].legend(fontsize=20, loc='upper left' )
#axarr[0].set_yticks((0,5,10,15))
axarr[0].set_xticks((-8,-4,0,4,8))
axarr[1].set_xticks((-8,-4,0,4,8))
#axarr[0].set_yticks((0,3,6,9,12))
Out[8]:
In [270]:
In [50]:
In [21]:
# f, axarr = subplots(3, 2, sharex='col', sharey='row', figsize=(6, 5.6))
f, axarr = subplots(3, 2, sharex='col', sharey='row', figsize=(6.8, 6.8))
# f, axarr = subplots(3, 2, sharex='col', sharey='row', figsize=(12, 11))
print axarr[0,0]
rcParams['figure.subplot.wspace'] = 0.04
rcParams['figure.subplot.hspace'] = 0.1
rcParams['figure.subplot.bottom'] = 0.13
rcParams['figure.subplot.right'] = 0.98
rcParams['figure.subplot.left'] = 0.16
rcParams['figure.subplot.top'] = 0.92
for num,b in enumerate(('(a)', '(b)', '(c)', '(d)', '(e)','(f)')):
print num/2 , num%2 , b
axarr[num/2,num%2].text(0.05, 0.9, b, transform=axarr[num/2,num%2].transAxes, fontweight='bold', va='top')
for i in range(3):
for j in range(2):
# axarr[0,j].set_ylim(0,12)
# # axarr[0,j].set_ylim(0,3.1)
# #axarr[1,j].set_ylim(0,21)
# axarr[1,j].set_ylim(0,15)
# axarr[2,j].set_ylim(0,7)
# cong for t1 = t2
# axarr[0,j].set_ylim(0,0.4)
# axarr[1,j].set_ylim(0,1.1)
# axarr[2,j].set_ylim(0,1.1)
# axarr[0,0].set_yticks(arange(0,.4, step=.2))
# axarr[1,0].set_yticks(arange(0,1.1, step=.5))
# axarr[2,0].set_yticks(arange(0,1.1, step=0.5))
# cong for t1 > 0 connected t2 = G2 =0
# axarr[0,j].set_ylim(0,1.6)
# axarr[1,j].set_ylim(0,1.7)
# axarr[2,j].set_ylim(0,1.7)
# axarr[0,0].set_yticks(arange(0,1.6, step=.5))
# axarr[1,0].set_yticks(arange(0,1.7, step=.5))
# axarr[2,0].set_yticks(arange(0,1.7, step=0.5)).
# cong for t2>0 connected t1 = G2 =0
axarr[0,j].set_ylim(0,1.6)
axarr[1,j].set_ylim(0,1.7)
axarr[2,j].set_ylim(0,1.7)
axarr[0,0].set_yticks(arange(0,1.6, step=.5))
axarr[1,0].set_yticks(arange(0,1.7, step=.5))
axarr[2,0].set_yticks(arange(0,1.7, step=0.5))
#axarr[i,j].text(0.1, 0.9, 'A', transform=axarr[i,j].transAxes, fontweight='bold', va='top')
#axarr[1,0].text(-0.3, 0.5, 'B', transform=axarr[1,1].transAxes, fontweight='bold', va='top')
# axarr[0,0].set_yticks(arange(0,3.1, step=1))
# axarr[0,0].set_yticks(arange(0,13, step=5))
# #axarr[0,0].set_yticks((0,5,10))
# axarr[1,0].set_yticks(arange(0,13, step=5))
# axarr[2,0].set_yticks(arange(0,7, step=2))
axarr[0,0].set_ylabel('$\\rho \pi \Gamma_1 $' , fontsize=24)
axarr[1,0].set_ylabel('$\\rho \pi \Gamma_1$' , fontsize=24)
axarr[2,0].set_ylabel('$\\rho \pi \Gamma_1$', fontsize=24)
# axarr[0,0].set_ylabel('$\\rho(\omega) $' , fontsize=24)
# axarr[1,0].set_ylabel('$\\rho(\omega)$' , fontsize=24)
# axarr[2,0].set_ylabel('$\\rho(\omega)$', fontsize=24)
#axarr[0,0].set_ylabel('$ \\mathbf{ \epsilon_{1,2} = 0 }$ \n $\\rho(\omega) $' , fontsize=26)
#axarr[1,0].set_ylabel('$ \\mathbf{ \epsilon_1 = 5\Gamma_1}$ \n $\\rho(\omega)$' , fontsize=24)
#axarr[2,0].set_ylabel('$ \\mathbf{\epsilon_2 = -5\Gamma_1}$ \n $\\rho(\omega)$', fontsize=24)
axarr[2,j].set_xticks((-8,-4,0,4,8))
axarr[2,j].set_xlabel('$\omega/ \Gamma_1$')
axarr[0,0].set_title('Dot 1')
axarr[0,1].set_title('Dot 2')
#Plot4Tits(axarr , 0 ,1.5, 3,0, '')
# DrawInsets(axarr, 1 , 'D3.png' , 'D2.png' , 'D1.png')
# Plot4Tits(axarr , 1 ,0, 2,2, '')
# Plot4Tits(axarr , G2 ,tdots,t1 ,t2 , lb ):
# t1=t2
# Plot4Tits(axarr , 1 ,0, 2,2, '')
# DrawInsets(axarr, 1 , 'D3.png' , 'D2V1.png' , 'D1V2.png')
# t1>0
# Plot4Tits(axarr , 0 ,1, 2,0, '')
# DrawInsets(axarr, 1 , 'D2.png' , 'D2V1.png' , 'D1V2.png')
# t2 > 0
Plot4Tits(axarr , 0 ,1, 0,2, '')
DrawInsets(axarr, 1 , 'D3.png' , 'D1V1.png' , 'D3V2.png')
# INSET
w = "30%" ; h = "30%" ; pos = (0.03, -0.17, 1.1, 1.2)
axins = inset_axes(axarr[1,0], width=w, height=h, bbox_to_anchor=pos,loc=6, bbox_transform=axarr[1,0].transAxes )
tits = DefineTitles(0 ,1,0 ,2 ,0, 5 ,0)
# print tits
plotMath( axins , tits[0] , '' , '-','r')
plotMath( axins , tits[1] , '' , '-','b')
axins.set_xlim(-1,1)
axins.set_ylim(0,1.2)
axins.set_xticks((-1,0,1))
axins.set_yticks((0,1))
setp(axins.get_xticklabels(), fontsize=23)
setp(axins.get_yticklabels(), fontsize=23)
rcParams.update({'figure.figsize': (200,200)})
#DrawInsets(axarr, 0 , 'DQD1.png' , 'DQD2.png' , 'DQD3.png')
#PlotNewARR(axarr , '' )
#for i in range(3):
axarr[0,0].legend(fontsize=17, loc='upper right')
Out[21]:
In [42]:
f, ax = subplots(1, 1, sharex='col', sharey='row', figsize=(6.8, 6.8))
tits = DefineTitles(0 ,1,0 ,2 ,0, 5 ,0)
plotMath( ax , tits[2] , '' , '-','r')
plotMath( ax , tits[3] , '' , '-','b')
In [259]:
# for i,b in enumerate(('(a)', '(b)', '(c)', '(d)', '(e)','(f)')):
# print i , b
# fig = figure()
# for i, label in enumerate(('A', 'B', 'C', 'D')):
# ax = fig.add_subplot(2,2,i+1)
# ax.text(0.05, 0.95, label, transform=ax.transAxes,
# fontsize=16, fontweight='bold', va='top')
#plt.show()
image = imread('D1.png')
imshow(image)
Out[259]:
In [12]:
f, axarr = subplots(2, 2, sharex='col',sharey='row', figsize=(6, 6.6))
print axarr[0,0]
rcParams['figure.subplot.wspace'] = 0.06
rcParams['figure.subplot.hspace'] = 0.19
rcParams['figure.subplot.bottom'] = 0.16
rcParams['figure.subplot.right'] = 0.99
rcParams['figure.subplot.left'] = 0.2
def PlotMode(axarr , NumCase , G2 ,tdots,t1 ,t2 , lb ,SUM):
i = NumCase
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,0)
plotMath(axarr[0,0],tits[1],'' , '-', 'b')
plotMath(axarr[0,0],tits[0],'', '--' , 'r')
plotMath(axarr[0,1],tits[3],' $ \uparrow$ ' + lb , '-', 'b')
plotMath(axarr[0,1],tits[2],' $\downarrow$ '+ lb , '--' , 'r')
tits = DefineTitles(G2 ,tdots,t1 ,t2 ,0, 0 ,5)
plotOneDot(axarr[1,0],i , 0 ,SUM)
plotOneDot(axarr[1,0],i , 1 ,SUM)
plotOneDot(axarr[1,1],i , 2 ,SUM)
plotOneDot(axarr[1,1],i , 3 ,SUM)
#y1 = 3.2 ; ystep1=1
#y2 = 3.2 ; ystep2=1
y1 = 16.2 ; ystep1=4
y2 = 6.2 ; ystep2=2
for i in range(2):
for j in range(2):
axarr[i,j].set_xlim(-10,10)
axarr[0,j].set_xlabel('$\omega/ \Gamma_1$')
axarr[1,j].set_xlabel('$(\omega / \Gamma_1)(U/ \Gamma_1)$')
axarr[0,j].set_ylim(0,y1)
axarr[0,j].set_yticks(arange(0,y1, step=ystep1))
axarr[1,j].set_ylim(0,y2)
axarr[1,j].set_yticks(arange(0,y2, step=ystep2))
#axarr[1,j].set_ylim(0,3)
# axarr[1,0].set_yticks((0,1,2,3))
#axarr[1,j].set_xticks((-8,-4,0,4,8))
axarr[1,j].set_xticks((-8,0,8))
axarr[0,0].set_ylabel('$\\textbf{U = 0}$ \n $ \\rho(\omega)$' )
axarr[1,0].set_ylabel('$\\textbf{U=17} \\mathbf{\Gamma_1} $ \n $ \\rho(\omega) $')
axarr[0,0].set_title('Dot 1')
axarr[0,1].set_title('Dot 2')
#PlotMode(axarr , 818 ,1 ,0, 2,2, '', True)
#PlotMode(axarr , 304 ,0 ,1, 2,0, '',False)
PlotMode(axarr , 309 ,0 ,1, 0,2, '',False)
In [ ]:
In [ ]:
In [192]:
In [ ]:
In [9]:
i = 458
#i = 817
i = 465
#i = 304
#i = 318
f, axarr = subplots(1, 2, sharex='col', sharey='row', figsize=(10, 5))
plotOneDot(axarr[0],i , 0)
plotOneDot(axarr[0],i , 1)
plotOneDot(axarr[1],i , 2)
plotOneDot(axarr[1],i , 3)
axarr[0].set_ylim(0,6)
axarr[0].set_xlim(-10,10)
axarr[1].set_xlim(-10,10)
axarr[0].set_title('Dot 1')
axarr[1].set_title('Dot 2')
axarr[0].set_xlabel('$(\omega / \Gamma_1) \\times (U/ \Gamma_1)$')
axarr[1].set_xlabel('$(\omega / \Gamma_1) \\times (U/ \Gamma_1)$')
axarr[0].set_ylabel('DOS')
axarr[1].legend(fontsize=18 , loc='upper right' )
#axarr[1].legend(fontsize=20, loc='upper right')
#axarr[0].set_xlim(-10,10)
#axarr[1].set_xlim(-10,10)
#axarr[0].set_xticks((-1.5,0,1.5))
#axarr[1].set_xticks((-1.5,0,1.5))
#axarr[0].set_ylim(0,11)
#axarr[0].set_yticks((0,1,2,3))
#axarr[0].set_title('Dot 1')
#axarr[1].set_title('Dot 2')
#axarr[0].set_xlabel('$\omega/\Gamma$')
#axarr[1].set_xlabel('$\omega/\Gamma$')
#axarr[0].set_ylabel('DOS')
axarr[1].legend(fontsize=18 , loc='upper right' )
print readfile_Param(i, 12) , readfile_Param(i, 13)
In [24]:
axarr[1].legend(fontsize=20, loc='upper left' )
#axarr[0].set_yticks((0,5,10,15))
axarr[0].set_yticks((0,1,2,3,4))
#axarr[0].set_yticks((0,3,6,9,12))
Out[24]:
In [63]:
#mpl.rcParams['lines.linewidth'] = 3
f, axarr = subplots(1, 1, sharex='col', sharey='row', figsize=(10, 5))
G2 = 0 ; tdots = 0 ; t1 = 0 ; t2 = 0 ; em = 0 ; e1 = 0 ;e2 = 0
#for t1 in array([0.5,1,2]):
#Plot2Tits(axarr , 0 ,tdots,t1 ,t2 ,em, e1 ,e2 , '$t='+repr(t1)+'\Gamma_1$')
# tits = DefineTitles(G2 ,tdots,t1 ,t2 ,em, e1 ,e2)
# plotMath(axarr,tits[0],'Spin-$\downarrow , \ t='+repr(t1)+'\Gamma_1$', '--')
#for e1 in array([1,2,5]):
#Plot2Tits(axarr , 0 ,tdots,t1 ,t2 ,em, e1 ,e2 , '$t='+repr(t1)+'\Gamma_1$')
# tits = DefineTitles(G2 ,tdots,1 ,t2 ,em, e1 ,e2)
# plotMath(axarr,tits[0],'Spin-$\downarrow , \ \epsilon_1='+repr(e1)+'\Gamma_1$', '--')
#plotMath(axarr,tits[1],'Spin-$\uparrow$' , '-')
#
#for em in array([0.5,1,3]):
#Plot2Tits(axarr , 0 ,tdots,t1 ,t2 ,em, e1 ,e2 , '$t='+repr(t1)+'\Gamma_1$')
# tits = DefineTitles(G2 ,tdots,1 ,t2 ,em, e1 ,e2)
# plotMath(axarr,tits[0],'Spin-$\downarrow , \ \epsilon_m='+repr(em)+'\Gamma_1$', '--')
#plotMath(axarr,tits[1],'Spin-$\uparrow$' , '-')
axarr.set_ylim(0,1)
axarr.set_title('')
axarr.set_xlabel('$\omega/ \Gamma_1$')
axarr.set_ylabel('DOS')
axarr.legend(fontsize=18 , loc='upper right' )
In [65]:
axarr[1].legend(fontsize=15, loc='upper left' )
Out[65]:
In [52]:
'Green/Gamma1=2.,Gamma2=2.,tdots=0.,t1=2.,t2=2.,em=0.,e1=0.,e2=0..dat'
readMath('Green/Gamma1=2.,Gamma2=2.,tdots=0.,t1=2.,t2=2.,em=0.,e1=0.,e2=0..dat')
In [53]:
'Green/Gamma1=2.,Gamma2=2.,tdots=0.,t1=2.,t2=2.,em=0.,e1=0.,e2=0..dat'
readMath('Green/Gamma1=2.,Gamma2=2.,tdots=0.,t1=2.,t2=2.,em=0.,e1=0.,e2=0..dat')
In [29]:
print 'Green/Gamma1=2.,Gamma2='+repr(int(G2*2))
In [37]:
out = 'run2000/rho_0_0_OmegaRhow_zEQAVG.00.dat'
dat = loadtxt(out, delimiter = ' ')
w = dat[:,0] ; rho = dat[:,1]
plot(w,rho)
xlim(-.5,.5)
Out[37]:
In [38]:
out = 'run450/rho_0_0_OmegaRhow_zEQAVG.00.dat'
dat = loadtxt(out, delimiter = ' ')
w = dat[:,0] ; rho = dat[:,1]
out = 'run550/rho_0_0_OmegaRhow_zEQAVG.00.dat'
dat = loadtxt(out, delimiter = ' ')
w = 0.5*(w +dat[:,0]) ; rho = 0.5*(rho + dat[:,1])
plot(w,rho)
xlim(-.5,.5)
In [28]:
axvline(x=8.8435)
list = [1,3,9,5,2,5,6,9,7]
# print diff(sign(diff(dat[:,1])))
twos = diff(sign(diff(dat[:,1])))
w = w[1:-1] ; rho = rho[1:-1]
wup = w[twos==-2] ; rhoup = rho[twos==-2]
# plot(dat[:,1],'.')
axvline(x=wup[-3],color ='r')
axvline(x=wup[2],color ='r')
print wup[2], wup[-3], rhoup[2]
rho[rho <= (rhoup[2]/2)]
# max(rho[])
trick = (rho >= (0.8)) & (w <= (-0.01))
a = [min(w[trick]) , max(w[trick]) ]
axvline(x=a[0],color ='b')
axvline(x=a[1],color ='b')
print (a[1]-a[0])
In [27]:
print(sqrt(2)) , 0.25/wup[2]
In [63]:
print wup[2], wup[-3], rhoup[2]
rho[rho <= (rhoup[2]/2)]
# max(rho[])
trick = (rho >= (rhoup[2]/2)) & (w <= (-0.01))
base = argmax(w[trick])
print rho[base] , w[base]
axvline(x=w[base],color ='y')
In [20]:
print dat[:,1]
In [ ]: