3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 23:03:51 +01:00
dft_tools/doc/reference/plotting_protocols/fit/demo1_prepare.py
tayral edd1ff4529 Restructuring documentation.
A first general restructuration of the doc according to the pattern [tour|tutorial|reference].
In the reference part, objects are documented per topic.
In each topic, [definition|c++|python|hdf5] (not yet implemented)
2014-10-18 12:21:08 +01: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}