3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 06:43:40 +01:00
dft_tools/test/triqs/gfs/test_fourier_matsubara.ipynb
Laura Messio 257bdb9d6a Work on gf
gf: security in the case beta<0 added in the mesh construction
gf: inline added in slice
test/triqs/gf: test of on_mesh() added
gfs: scalar for two-real_times
test/triqs/gf/ renamed in gfs, test gf_retw.cpp completed
gfs: evaluator homogeneised
two_times: evaluator corrected
test/triqs/gf/ renamed in gfs, test gf_retw.cpp completed

+ Correction after rebase

Fix a test : gf_re_im_freq_time
There is an issue with the last point.
To be fixed.
2013-09-09 15:41:46 +02:00

313 KiB

None <html> <head> </head>
In [1]:
from pytriqs.archive import HDFArchive
from pytriqs.gf.local import GfReFreq, GfReTime
from pytriqs.plot.mpl_interface import oplot

# Opens the file G.h5, in read mode
R = HDFArchive('../../../../build/test/triqs/gf/fourier_real_time.h5', 'r')
Gw1 = R['Gw1']
Gt1 = R['Gt1']
Gw1b = R['Gw1b']
Gt1b = R['Gt1b']
Gt2 = R['Gt2']
Gw2 = R['Gw2']
Gw2b = R['Gw2b']
Gt3 = R['Gt3']
Gw3 = R['Gw3']
In [2]:
a0=0.632456
def lorentz(x,a=a0):
    return 2.0*a / (x*x + a*a)
def lorentz_inv(x,a=a0):
    return exp(-a*abs(x))
oplot(Gw1,'o',lorentz,'-')
show()
#verification that TF(TF^{-1})=Id
oplot(Gw1b,'-o')
show()
oplot(Gt1,'-o',lorentz_inv,'-',x_window=(-100,100))
show()
#verification that TF(lorentz)=lorentz_inv
oplot(Gt1b,'o')
show()
In [3]:
a0=7.03184
def expo(x,a=a0):
    if(x>0):return -0.5*1j*exp(-a*x)
    else:return 0.5*1j*exp(a*x)
def expo_inv(x,a=a0):
    return 0.5/(x+a*1j)+0.5/(x-a*1j)

oplot(Gt2,'o',expo,'-')
show()
oplot(Gw2,'o',expo_inv,'-',x_window=(-50,50))
show()
oplot(Gw2b,'o',x_window=(-50,50))
show()
In [4]:
oplot(Gt3,'o')
show()
oplot(Gw3,'o',x_window=(-15,15))
show()
In [4]:

In [4]:

In [ ]:

</html>