dgamore.self_energy#
Single-particle self-energy. SelfEnergy wraps the (possibly momentum-dependent) self-energy
\(\Sigma_{ab}(k, \nu)\) and provides its high-frequency moments (\(\Sigma_\infty\) and the
\(1/\imath\nu\) coefficient), tools to estimate the core frequency box, to append the analytic asymptotic
tail beyond the core, to polynomial-fit the tail, and to interpolate the self-energy between temperatures. The
moments are obtained by fitting the highest available Matsubara frequencies.
- class dgamore.self_energy.SelfEnergy(mat: ndarray, nk: tuple[int, int, int] = (1, 1, 1), full_niv_range: bool = True, has_compressed_q_dimension: bool = False, estimate_niv_core: bool = False, calc_smom: bool = True, beta: float = None)[source]#
Bases:
TwoPointThe (possibly momentum-dependent) single-particle self-energy \(\Sigma_{ab}(k, \nu)\). On top of the two-point orbital bookkeeping inherited from
LocalTwoPointit provides the high-frequency moments (\(\Sigma_\infty\) and the \(1/\imath\nu\) coefficient), an estimate of the core frequency box, the construction/append of the analytic asymptotic tail beyond the core, a polynomial tail fit, and the temperature/frequency interpolation between grids. The moments are obtained by fitting the highest available Matsubara frequencies.- Parameters:
- add(other) SelfEnergy[source]#
Adds another
SelfEnergy(momentum dimensions are aligned first) or a numpy array; see_add().- Parameters:
other – A
SelfEnergyor numpy array.- Returns:
A new
SelfEnergyholding the sum (moments not recomputed).- Return type:
- append_asympt(niv: int)[source]#
Returns a copy with the analytic asymptotic tail appended on both ends so that the frequency box extends to
niv. A no-op (returns a copy) ifniv <= self.niv.- Parameters:
niv (int) – Target number of positive fermionic frequencies.
- Returns:
A copy of the self-energy extended to
niv.
- concatenate_self_energies(other: SelfEnergy) SelfEnergy[source]#
Builds a self-energy that keeps
selfinside its core box and usesotherfor the shell, up toother.niv.- Parameters:
other (SelfEnergy) – The self-energy supplying the shell frequencies; must have at least as many frequencies as
self.- Returns:
A new
SelfEnergyspanningother’s frequency box.- Raises:
ValueError – If
otherhas fewer frequencies thanself.- Return type:
- create_with_asympt_up_to_core() SelfEnergy[source]#
Returns a copy whose data inside the estimated core box is kept and whose shell (up to the full stored box) is replaced by the analytic asymptotic tail. A no-op (returns a copy) if the core already spans the full box or the tail is empty.
- Returns:
A copy of the self-energy with the asymptotic tail outside the core region.
- Return type:
- fit_polynomial(n_fit: int = 4, degree: int = 3, niv_core: int = 0) SelfEnergy[source]#
Replaces the self-energy by a per-(momentum, orbital) polynomial fit of the positive-frequency data, evaluated on the full positive frequency grid, then mirrored to the full range. A no-op (returns a copy) if
n_fit == 0.- Parameters:
n_fit (int) – Number of positive frequencies used for the fit; if 0 the object is returned unchanged, and if larger than
self.niv(or negative) it falls back toniv_core + 200.degree (int) – Degree of the fitted polynomial.
niv_core (int) – Core frequency count used for the fallback
n_fitwhenn_fitis out of range.
- Returns:
A new
SelfEnergyholding the polynomial fit, in the full fermionic frequency range.- Return type:
- fit_smom()[source]#
Fits the first two high-frequency moments of the (k-averaged) self-energy from the highest stored Matsubara frequencies: the constant Hartree shift \(\Sigma_\infty\) (real part) and the \(1/\imath\nu\) coefficient \(\Sigma_1\) (from the imaginary part). At least four frequencies are used for the fit.
- Returns:
The tuple
(mom0, mom1)of moments, each of shape[o1, o2].
- interpolate(beta_target: float, niv_target: int, niv_linear: int = 4) SelfEnergy[source]#
Re-grids the self-energy from its own inverse temperature \(\beta\) (
self._beta) tobeta_target. Only the last (frequency) axis is interpolated.The innermost niv_linear source frequencies are interpolated linearly (no curvature assumption where the grid is sparsest); everything above is interpolated with shape-preserving (PCHIP) splines. Re/Im are handled separately on the full signed grid. All target frequencies are returned.
- Parameters:
- Returns:
A new
SelfEnergyon the target frequency grid (half niv range flag set to full on output).- Return type:
- property smom: tuple[ndarray, ndarray]#
The fitted high-frequency moments of the self-energy.
- Returns:
The first two high-frequency moments \((\Sigma_\infty, \Sigma_1)\) of the self-energy, each of shape
[o1, o2].
- sub(other) SelfEnergy[source]#
Subtracts another
SelfEnergyor numpy array, implemented asself._add(other, subtract=True)(see_add()).- Parameters:
other – A
SelfEnergyor numpy array.- Returns:
A new
SelfEnergyholding the difference.- Return type: