gftool.pade.averaged

gftool.pade.averaged(z_out, z_in, *, valid_z=None, fct_z=None, coeff=None, filter_valid=None, kind: KindSelector)[source]

Return the averaged Padé continuation with its variance.

The output is checked to have an imaginary part smaller than threshold, as retarded Green’s functions and self-energies have a negative imaginary part. This is a helper to conveniently get the continuation, it comes however with overhead.

Parameters:
z_out(N_out,) complex ndarray

Points at with the functions will be evaluated.

z_in(N_in,) complex ndarray

Complex mesh used to calculate coeff.

valid_z(N_out,) complex ndarray, optional

The output range according to which the Padé approximation is validated (compared to the threshold).

fct_z(N_z, ) complex ndarray, optional

Function at points z from which the coefficients will be calculated. Can be omitted if coeff is directly given.

coeff(N_in,) complex ndarray, optional

Coefficients for Padé, calculated from pade.coefficients. Can be given instead of fct_z.

filter_validcallable or iterable of callable

Function determining which approximants to keep. The signature should be filter_valid(iterable) -> bool ndarray. Currently there are the functions {FilterNegImag, FilterNegImagNum, FilterHighVariance} implemented to generate filter functions. Look into the implemented for details to create new filters.

kind{KindGf, KindSelf}

Defines the asymptotic of the continued function and the number of minimum and maximum input points used for Padé. For KindGf the function goes like \(1/z\) for large z, for KindSelf the function behaves like a constant for large z.

Returns:
averaged.x(N_in, N_out) complex ndarray

Function evaluated at points z.

averaged.err(N_in, N_out) complex ndarray

Variance associated with the function values pade.x at points z.