Transfer#
Implements the line-of-sight integration of sources into the temperature, E-mode and lensing potential transfer functions.
Instead of following the photon hierarchy to l ~ 2500, one integral of the
sources (discocmb.sources) against spherical Bessel functions gives the
temperature transfer function,
Theta_l(k) = int_0^{tau_0} dtau [S j_l(x) + S_j1 j_l'(x) + S_j2 j_l''(x)]
with x = k (tau_0 - tau). The E-mode transfer function integrates the
quadrupole term against j_l(x) / x^2,
E_l(k) = sqrt((l+2)!/(l-2)!) int_0^{tau_0} dtau S_j2 j_l(x) / x^2
(Zaldarriaga & Seljak 1997, CAMB’s sources(2)). The tables hold
j_l(x) / x^2 directly as a fourth Bessel row. Dividing after linear
interpolation would fail near x = 0, where j_2(x) / x^2 -> 1/15 and a
reionized universe still has visibility.
transfer_functions() takes what discoeb.solve_eb() kept and the
Grid it solved on. A 5-point Lagrange stencil
(resample_stencil(), resample()) puts each cosmology’s sources,
saved at shared scale factors and so at conformal times of its own, on the
fiducial’s distances, stretched so that recombination sits on the
fiducial’s dense points. project() refines them in ln k with the
band of a spline operator and contracts them against the grid’s Bessel
tables in chunks of modes. lensing_transfer() projects the saved Weyl
potential against the lensing kernel, exactly at low l and by the
Limber approximation above.
FFTLog lost against the table contraction: it needs 32768 log-spaced points to resolve recombination and costs ten times more.
- discocmb.transfer_functions(values, grid) Transfers[source]#
Return the
Transfersof the sourcesvaluesthat a solve kept ongrid.valuesisdiscoeb.solve_eb()’s(n_c, 7, n_k, n_save)ofkeepat the modesgrid.k_valuesand the scale factorsgrid.a_save. Traceable, and differentiable invalues.Each cosmology reaches conformal times of its own at the saves, its last the conformal age. A 5-point stencil resamples its sources onto the fiducial’s distances, stretched by its distance to last scattering over the fiducial’s (
project()), and the Bessel tables ofgridproject them onto the multipoles. The lensing potential’s transfer reads the Weyl potential on the unstretched grid, since its kernel is broad inchi.
- namedtuple discocmb.transfer.Transfers(theta: jax.Array, theta_e: jax.Array, scale: jax.Array, theta_psi: jax.Array, limber: jax.Array, grid: Any)[source]#
Bases:
NamedTupleThe transfer functions of a batch, from
transfer_functions().The spectra are quadratic forms of these, weighted by the primordial spectrum (
cmb_power_spectrum()), so a change ofA_sorn_salone needs no new solve. A JAX pytree, like theGridit carries.- Fields:
theta (
Array) – The temperature transfer functions(n_k_fine, n_ell, n_c)atk_fine / scale, without the factorscale.theta_e (
Array) – The E-mode transfer functions, likewise.scale (
Array) – Each distance to last scattering over the fiducial’s,(n_c,).theta_psi (
Array) – The lensing potential’s transfer functions at its exact multipoles,(n_c, n_ell_exact, n_k_lensing).limber (
Array) – The Limber integrand of the lensing potential withoutP_R,(n_c, n_ell_limber, n_save).