Expand description
Spectral shapes and distributions for CMB spectral distortions.
All functions here take the dimensionless frequency x = hν/(kT_z) and
return an occupation-number perturbation Δn. They are normalized so
that the corresponding distortion amplitude (μ, y, ΔT/T) is the
coefficient that multiplies the shape — e.g. Δn_μ(x) = μ · M(x),
Δn_y(x) = y · Y_SZ(x), Δn_T(x) = (ΔT/T) · G_bb(x).
Provided shapes:
planck— equilibrium blackbodyn_pl(x) = 1/(e^x − 1)(small-xand large-xbranches preserve precision).bose_einstein—1/(e^{x+μ} − 1), the chemical-potential family.mu_shape— μ-distortion shapeM(x)(Sunyaev-Zel’dovich 1970).y_shape— y-distortion shapeY_SZ(x)(Zeldovich-Sunyaev 1969).temperature_shift_shape—G_bb(x) = x e^x / (e^x − 1)², the temperature-shift modeδT/T.
Conventions match those used by crate::greens and the Python
spectroxide.greens module so PDE and Green’s-function results can be
decomposed against the same basis.
Functions§
- bose_
einstein - Bose-Einstein distribution: n_BE(x, μ) = 1/(e^(x+μ) - 1)
- compton_
equilibrium_ ratio - Compute the Compton equilibrium temperature ratio T_e^eq / T_z from the photon spectrum.
- delta_
n_ over_ n - Compute fractional photon number change: ΔN/N = ∫x² Δn dx / G₂
- delta_
rho_ over_ rho - Compute fractional energy in distortion: Δρ/ρ = ∫x³ Δn dx / G₃
- g_bb
- Blackbody derivative: G_bb(x) = x e^x / (e^x - 1)² This is -x ∂n_pl/∂x = x²/(4T) ∂B_ν/∂T normalized
- mu_
shape - μ-distortion spectral shape: M(x) = (x/β_μ - 1) · e^x / (e^x - 1)²
- planck
- Planck (blackbody) occupation number: n_pl(x) = 1/(e^x - 1)
- spectral_
integral - Numerical integral of x^n * n_pl(x) over [0, x_max] using the trapezoidal rule on a logarithmic grid. Used for validation against analytic G_n values.
- y_shape
- Y-distortion (Sunyaev-Zeldovich) spectral shape: Y_SZ(x) = G_bb(x) · [x·coth(x/2) - 4]