gftool.pade.Mod_Averager
- gftool.pade.Mod_Averager(z_in, coeff, mod_fct, *, valid_pades, kind: KindSelector, vectorized=True)[source]
Create function for averaging Padé scheme using mod_fct before the average.
This function behaves like
Averager
just that mod_fct is applied before taking the averages. This should be used, if not the analytic continuation but a mollification thereof is used.- Parameters:
- z_in(N_in,) complex ndarray
Complex mesh used to calculate coeff.
- coeff(…, N_in) complex ndarray
Coefficients for Padé, calculated from pade.coefficients.
- mod_fctcallable
Modification of the analytic continuation. The signature of the function should be mod_fct (z, pade_z, *args, **kwds), the tow first arguments are the point of evaluation z and the single Padé approximants.
- valid_padeslist_like of bool
Mask which continuations are correct, all Padés where valid_pades evaluates to false will be ignored for the average.
- 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, forKindSelf
the function behaves like a constant for large z.- vectorizedbool, optional
If vectorized, all approximants are given to the function simultaneously where the first dimension corresponds to the approximants. If not vectorized, mod_fct will be called for every approximant separately (default: True).
- Returns:
- function
The continued function f(z) (z, ) -> Result. f(z).x contains the function values f(z).err the associated variance.
- Raises:
- TypeError
If valid_pades not of type bool
- RuntimeError
If all there are none elements of valid_pades that evaluate to True.