3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 06:43:40 +01:00
dft_tools/doc/reference/python/data_analysis/fit/demo1_prepare.py

15 lines
501 B
Python
Raw Normal View History

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}