gftool.basis.pole.PoleGf.from_tau
- classmethod PoleGf.from_tau(gf_tau, n_pole, beta, moments=(), occ=False, width=1.0, weight=None)[source]
Generate instance fitting
gf_tau
.Finds poles and weights for a pole Green’s function matching the given Green’s function
gf_tau
.Note that for an odd number of moments, the central pole is at z = 0, so the causal Green’s function g(0) diverges.
- Parameters:
- gf_tau(…, N_tau) float np.ndarray
Imaginary times Green’s function which is fitted.
- n_poleint
Number of poles to fit.
- betafloat
The inverse temperature \(beta = 1/k_B T\).
- moments(…, N) float array_like
Moments of the high-frequency expansion, where G(z) = moments / z**np.arange(N) for large z.
- occfloat, optional
If given, fix occupation of pole Green’s function to
occ
(default: False).- widthfloat, optional
Distance of the largest pole to the origin (default: 1.0).
- weight(…, N_tau) float np.ndarray, optional
Weight the values of
gf_tau
, can be provided to include uncertainty.
- Returns:
- PoleFct
Instance with (N) poles at the Chebyshev nodes for degree N and (…, N) residues such that the pole function fits
gf_z
.
- Raises:
- ValueError
If more moments are given than poles are fitted (len(moments) > n_pole).
See also
Notes
We employ the similarity of the relation betweens the
moments
and the poles and residues with polynomials and the Vandermond matrix. The poles are chooses as Chebyshev nodes, the residues are calculated accordingly.