3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 22:33:48 +01:00
dft_tools/doc/reference/python/data_analysis/fit/demo1_prepare.py
Olivier Parcollet f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00

15 lines
501 B
Python

import numpy as np
from pytriqs.plot.mpl_interface import oplot
from pytriqs.gf.local import *
from pytriqs.gf.local.descriptors import iOmega_n
g = GfImFreq(indices = [1], beta = 300, n_points = 1000, name = "g")
from pytriqs.archive import HDFArchive
R = HDFArchive('myfile.h5', 'w')
for n, Z0 in enumerate( np.arange (1,0, -0.1) ) :
g <<= inverse( iOmega_n + 0.5 - iOmega_n * ( 1 - 1/Z0) ) # / (1 + 4*iOmega_n*iOmega_n) )
g.name = "Z = %s"%Z0
R[ str(n) ] = { 'Z0' : Z0, 'g' : g}