gftool.pade.averaged¶
-
gftool.pade.averaged(z_out, z_in, *, valid_z=None, fct_z=None, coeff=None, filter_valid=None, kind: gftool.pade.KindSelector)[source]¶ Return the averaged Pade 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 Pade 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 Pade, calculated from pade.coefficients. Can be given instead of fct_z.
- filter_valid : callable 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 Pade. For
KindGfthe function goes like \(1/z\) for large z, forKindSelfthe 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