gftool.basis.pole.gf_from_moments
- gftool.basis.pole.gf_from_moments(moments, width=1.0) PoleFct [source]
Find pole Green’s function matching given
moments
.Finds poles and weights for a pole Green’s function matching the given high frequency
moments
for large z: g(z) = np.sum(weights / (z - poles)) = moments / z**np.arange(N)Note that for an odd number of moments, the central pole is at z = 0, so g(0) diverges.
- Parameters:
- moments(…, N) float array_like
Moments of the high-frequency expansion, where G(z) = moments / z**np.arange(1, N+1) for large z.
- widthfloat or (…) float array_like or None, optional
Spread of the poles; they are in the interval [-width, width]. width=1 are the normal Chebyshev nodes in the interval [-1, 1]. If width=None and the second moment moments[…, 1] is given, the largest pole will match the second moment, unless it is small (abs(moments[…, 1]) < 0.1), then we choose width=1.
- Returns:
- gf.resids(…, N) float np.ndarray
Residues (or weight) of the poles.
- gf.poles(N) or (…, N) float np.ndarray
Position of the poles, these are the Chebyshev nodes for degree N.
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.