Tools for GFs¶
-
pytriqs.gf.tools.
delta
(g)[source]¶ Compute Delta_iw from G0_iw. CAUTION: This function assumes the following properties of g
- The diagonal components of g should decay as 1/iOmega
- g should fullfill the property g[iw][i,j] = conj(g[-iw][j,i])
Parameters: g (BlockGf (of GfImFreq) or GfImFreq) – Non-interacting Green’s function. Returns: delta_iw – Hybridization function. Return type: BlockGf (of GfImFreq) or GfImFreq
-
pytriqs.gf.tools.
dyson
(**kwargs)[source]¶ Solve Dyson’s equation for given two of G0_iw, G_iw and Sigma_iw to yield the third.
Parameters:
-
pytriqs.gf.tools.
fit_legendre
(g_t, order=10)[source]¶ General fit of a noisy imaginary time Green’s function to a low order Legendre expansion in imaginary time.
Only Hermiticity is imposed on the fit, so discontinuities has to be fixed separately (see the method enforce_discontinuity)
Author: Hugo U.R. Strand
Parameters: - g_t (TRIQS imaginary time Green's function (matrix valued)) – Imaginary time Green’s function to fit (possibly noisy binned data)
- order (int) – Maximal order of the fitted Legendre expansion
Returns: g_l – Fitted Legendre Green’s function with order order
Return type: TRIQS Legendre polynomial Green’s function (matrix valued)
-
pytriqs.gf.tools.
make_zero_tail
(g, n_moments=10)[source]¶ Return a container for the high-frequency coefficients of a given Green function initialized to zero.
Parameters:
-
pytriqs.gf.tools.
read_gf_from_txt
(block_txtfiles, block_name)[source]¶ Read a GfReFreq from text files with the format (w, Re(G), Im(G)) for a single block.
Notes
A BlockGf must be constructed from multiple GfReFreq objects if desired. The mesh must be the same for all files read in. Non-uniform meshes are not supported.
Parameters: - block_txtfiles (Rank 2 square np.array(str) or list[list[str]]) –
The text files containing the GF data that need to read for the block. e.g. [[‘up_eg1.dat’]] for a one-dimensional block and
- [[‘up_eg1_1.dat’,’up_eg2_1.dat’],
- [‘up_eg1_2.dat’,’up_eg2_2.dat’]] for a 2x2 block.
- block_name (str) – Name of the block.
Returns: g – The real frequency Green’s function read in.
Return type: - block_txtfiles (Rank 2 square np.array(str) or list[list[str]]) –