Function greens_function

Source
pub fn greens_function(x: f64, z_h: f64) -> f64
Expand description

Compute the Green’s function G_th(x, z_h) for a delta-function energy injection at redshift z_h, observed at z = 0.

The three-component decomposition from Chluba (2013), Eq. 6:

G_th = (3/κ_c) · J_μ · J_bb* · M(x) + J_y/4 · Y_SZ(x) + (1−J_bb*)/4 · G(x)

where J_μ, J_y, and J_bb* are independently fitted visibility functions, and the temperature-shift coefficient (1 − J_bb*)/4 follows the Chluba (2013) convention.

Returns the distortion Δn(x) per unit Δρ/ρ injected.

§Accuracy

Per-point spectral shape vs PDE (worst-case over frequency grid):

  • Deep μ-era (z_h > 2×10⁵): < 17% per-point; < 5% on integrated μ.
  • y-era (z_h < 10⁴): < 5% per-point; < 1% on integrated y.
  • Transition era (z_h ~ 3×10⁴ – 10⁵): 8–17% per-point shape error (improved from 30–70% by using the independently fitted J_y instead of 1 − J_μ). Integrated μ and y agree with PDE to ~5–10%.

References: Chluba (2013), MNRAS 436, 2232 [arXiv:1304.6120], Eq. 6 Arsenadze et al. (2025), JHEP 03, 018 [arXiv:2409.12940], Appendix D