Your programs are well written but with no comments it is heavy to follow them.
For the system you propose, the analytical result is straightforward using the Landauer -Buttiker formula:
with Gamma the broadening.
import kwant
from matplotlib import pyplot
from numpy import *
t1,t2=1,1.5
lat = kwant.lattice.square(a)
sys = kwant.Builder()
sys[lat(0,0) ] = 0 ###system one site x==0
#define and attach the leads
lead1 = kwant.Builder(kwant.TranslationalSymmetry((-a, 0)))
lead1[lat(0, 0) ] = 0
lead1[lat.neighbors()] = -t1
lead2 = kwant.Builder(kwant.TranslationalSymmetry((+a, 0)))
lead2[lat(1, 0) ] = 0
lead2[lat.neighbors()] = -t2
sys.attach_lead(lead1)
sys.attach_lead(lead2)
#finalize system
syst=sys.finalized()
energies=linspace(-1.999,1.999,50)
#transmission calculated by Kwant
transmission=[]
for E in energies:
smatrix=kwant.smatrix(syst,E)
transmission.append(smatrix.transmission(0,1))
#the linewidth Gamma (Landauer Buttiker formula)
def Gamma(E,t):
return sqrt(4*t**2-E**2)
#analytical result of the conductance using Landauer Buttiker formula
def T(E,t1,t2):
return 4*Gamma(E,t1)*Gamma(E,t2)/abs(Gamma(E,t1)+Gamma(E,t2))**2
T=[T(E,1.,1.5) for E in energies]
pyplot.plot(energies,T) #kwant
pyplot.plot(energies,transmission,'ro') #analytical result
pyplot.ylabel('Transmission')
pyplot.xlabel('Energy')
pyplot.show()
Hope this helps.