3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 06:43:40 +01:00
dft_tools/test/triqs/gf/test_fourier_real_time.ipynb
Laura Messio 38d89e2d01 work on gf: scalar_valued, ...
- introducing scalar_valued gf
- Change Fourier routines to run on scalar_valued,
and then use those routines to run on matrix_valued.
- Tools for slices of 2 variables functions
2013-07-19 13:41:34 +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>