dgamore.matsubara_frequencies#
Helpers for Matsubara frequency arithmetic. MFHelper builds the integer index grids and the
corresponding real bosonic/fermionic Matsubara frequencies used throughout the code, and converts
particle-hole (ph) frequency triples to particle-particle (pp) notation.
- class dgamore.matsubara_frequencies.FrequencyShift(*values)[source]#
Bases:
EnumEnum for the direction of an asymptotic frequency shift (used when extending a quantity beyond its core box).
- Variables:
MINUS – Shift towards negative frequencies.
PLUS – Shift towards positive frequencies.
CENTER – Centered (symmetric) shift.
NONE – No shift.
- class dgamore.matsubara_frequencies.MFHelper[source]#
Bases:
objectCollection of static helpers for Matsubara frequency index and grid arithmetic.
- static get_frequencies_for_ph_to_pp_w0_channel_conversion(niw: int, niv: int) tuple[ndarray, ndarray, ndarray][source]#
Returns the index arrays that map a particle-hole quantity onto the \(\omega = 0\) particle-particle notation, i.e. the \((\omega', \nu_1', \nu_2')\) indices such that \(F_{pp}[\omega, \nu_1, \nu_2] = F_{ph}[\omega', \nu_1', \nu_2']\) with the frequency shift \((\omega = 0, \nu_1, \nu_2) \to (\nu_1 + \nu_2, \nu_1, \nu_2)\). The returned arrays are already offset so they can be used to index directly into the full (positive-and-negative) ph frequency axes.
- Parameters:
- Returns:
Tuple
(wn_pp, vn_pp, vpn_pp)of index arrays for the bosonic and the two fermionic axes.- Return type:
- vn(niv: int, shift: int = 0, return_only_positive: bool = False) ndarray[source]#
Returns the integer fermionic Matsubara indices in the half-open interval \([-\mathrm{niv}, \mathrm{niv})\), optionally shifted. This is the index-only overload (no temperature dependence).
- Parameters:
- Returns:
1D integer array of fermionic Matsubara indices.
- Return type:
vn(niv: int, beta: float, shift: int = 0, return_only_positive: bool = False) -> numpy.ndarray
Returns the real fermionic Matsubara frequencies \(\nu_n = (2 n + 1) \pi / \beta\) for the index range \(n \in [-\mathrm{niv}, \mathrm{niv})\), optionally shifted.
- Parameters:
- Returns:
1D real array of fermionic Matsubara frequencies.
- Return type:
- wn(niw: int, shift: int = 0, return_only_positive: bool = False) ndarray[source]#
Returns the integer bosonic Matsubara indices in the closed interval \([-\mathrm{niw}, \mathrm{niw}]\), optionally shifted. This is the index-only overload (no temperature dependence).
- Parameters:
- Returns:
1D integer array of bosonic Matsubara indices.
- Return type:
wn(niw: int, beta: float, shift: int = 0, return_only_positive: bool = False) -> numpy.ndarray
Returns the real bosonic Matsubara frequencies \(\omega_n = 2 n \pi / \beta\) for the index range \(n \in [-\mathrm{niw}, \mathrm{niw}]\), optionally shifted.
- Parameters:
- Returns:
1D real array of bosonic Matsubara frequencies.
- Return type: