Function distortion_from_photon_injection

Source
pub fn distortion_from_photon_injection<F>(
    x_grid: &[f64],
    x_inj: f64,
    dn_dz: F,
    z_min: f64,
    z_max: f64,
    n_z: usize,
    sigma_x: f64,
    cosmo: &Cosmology,
) -> Vec<f64>
where F: Fn(f64) -> f64,
Expand description

Compute spectral distortion from an arbitrary photon injection history.

ΔI(x) = ∫ G_ph(x, x_inj, z’) × d(ΔN/N)/dz’ dz’

This integrates the photon injection Green’s function over the injection history, analogous to distortion_from_heating for energy injection.

§Arguments

  • x_grid - observation frequency grid
  • x_inj - injection frequency
  • dn_dz - function giving d(ΔN/N)/dz at each redshift
  • z_min - minimum integration redshift
  • z_max - maximum integration redshift
  • n_z - number of redshift integration points
  • sigma_x - extra Gaussian width for the surviving photon bump (0 for pure Compton)
  • cosmo - cosmological parameters (for Compton y_γ)