triqs.gfs.tools.read_gf_from_txt
- triqs.gfs.tools.read_gf_from_txt(block_txtfiles, block_name)[source]
Read a real-frequency Green’s function block from text files.
Each text file must have three columns
(w, Re(G), Im(G)); multiple files are combined into a matrix-valuedGfReFreq.- Parameters:
- block_txtfiles2D array-like of str
Rank-2 array of file names, one per matrix element of the target space, e.g.
[['up_eg1.dat']]for a 1x1 block or[['11.dat', '12.dat'], ['21.dat', '22.dat']]for a 2x2 block.- block_namestr
Name attached to the returned Green’s function.
- Returns:
- GfReFreq
Matrix-valued real-frequency Green’s function read from disk.
Notes
The mesh must be identical across files.
Non-uniform meshes are not supported.
A
BlockGfmust be assembled manually from multipleGfReFreqobjects if desired.
Examples
>>> g_up = read_gf_from_txt([['up_11.dat', 'up_12.dat'], ... ['up_21.dat', 'up_22.dat']], 'up')