TauMaxEnt

class triqs_maxent.tau_maxent.TauMaxEnt(cov_threshold=1e-14, **kwargs)[source]

Bases: object

Perform MaxEnt with a \(G(\tau)\) kernel.

The methods and properties of MaxEntLoop are, in general, shadowed by TauMaxEnt, i.e., they can be used in a TauMaxEnt object as well.

Parameters:
cov_thresholdfloat

when setting a covariance using TauMaxEnt.set_cov(), this threshold is used to ignore small eigenvalues

**kwargs

are passed on to MaxEntLoop

Attributes:
maxent_loop
tau

Methods

set_G_iw(G_iw[, np_tau])

Set \(G(\tau)\) from TRIQS GfImFreq

set_G_tau(G_tau[, re, tau_new])

Set \(G(\tau)\) from TRIQS GfImTime

set_G_tau_data(tau, G_tau)

Set \(G(\tau)\) from array.

set_G_tau_file(filename[, tau_col, G_col, ...])

Set \(G(\tau)\) from data file.

set_cov(cov)

Set covariance matrix from array.

set_cov_file(filename)

Set covariance matrix from data file.

set_error(error)

Set error from array.

get_tau

set_tau

set_G_iw(G_iw, np_tau=-1, **kwargs)[source]

Set \(G(\tau)\) from TRIQS GfImFreq

Parameters:
G_iwGfImFreq

The data for the analytic continuation. A Fourier transform is performed

np_tauint

Number of target tau points (must be >= (3*len(G_iw.mesh)+1 or -1; then (3*len(G_iw.mesh)+1) is chosen)

**kwargs

arguments supplied to set_G_tau()

set_G_tau(G_tau, re=True, tau_new=None)[source]

Set \(G(\tau)\) from TRIQS GfImTime

Parameters:
G_tauGfImTime

The data for the analytic continuation. For Green functions with more than 1x1 matrix structure, choose a particular matrix element.

relogical

If True, the real part of the data is continued, else the imaginary part.

tau_newarray

G_tau is interpolated on a new tau grid as given by tau_new. If not given, the original tau grid of G_tau is used.

set_G_tau_data(tau, G_tau)[source]

Set \(G(\tau)\) from array.

Parameters:
tauarray

tau-grid

G_tauarray

The data for the analytic continuation.

set_G_tau_file(filename, tau_col=0, G_col=1, err_col=None)[source]

Set \(G(\tau)\) from data file.

Parameters:
filenamestr

the name of the file to load. The first column (see tau_col) is the \(\tau\)-grid, the second column (see G_col) is the \(G(\tau)\) data.

tau_colint

the 0-based column number of the \(\tau\)-grid

G_colint

the 0-based column number of the \(G(\tau)\)-data

err_colint

the 0-based column number of the error-data or None if the error is not supplied via a file

set_cov(cov)[source]

Set covariance matrix from array.

The covariance matrix is diagonalized and the analytic continuation problem is rotated into the eigenbasis. Thus, diagonal errors can be used. The errors are the square roots of the eigenvalues of the covariance matrix. Due to numerics, small eigenvalues have to be ignored; this is done according to the parameter cov_threshold.

Parameters:
covarray

covariance matrix, \(N_\tau \times N_\tau\). It has to be symmetric.

set_cov_file(filename)[source]

Set covariance matrix from data file.

See TauMaxEnt.set_cov() for more info.

Parameters:
filenamestr

the name of the file to load.

set_error(error)[source]

Set error from array.

Parameters:
errorscalar or array

the error of the data, either in the same shape as the supplied G_tau or as a scalar (then it’s the same for all \(\tau\)-values).