Lensing#
Implements weak lensing of the CMB temperature and polarization spectra.
Lensing potential spectrum
C_l^{psi psi}, comes from the Weyl potential (the fourth source channel ofdiscocmb.sources). The lensing potential is computed by integrating the Weyl potential along the line of sight (Lewis & Challinor 2006, eq. 4.6, CAMB’ssources(3)):psi(n) = -2 int_0^{chi_*} dchi (chi_* - chi) / (chi chi_*) phi_W(chi n, tau_0 - chi),so
Theta_l^psi(k) = -2 int dchi W(chi) phi_W(k, tau_0 - chi) j_l(k chi)andC_l^{psi psi} = 4 pi int dln k P_R(k) |Theta_l^psi(k)|^2, with the normalization ofdiscocmb.cmb_power_spectrum(). The kernel is broad inchi, so the transfer function is smooth ink. The solved modes suffice for the quadrature, and the projection is a small matrix product per cosmology (exact_lensing_operator(),lensing_transfer()).Lensed spectra are computed using the full-sky correlation-function method of Challinor & Lewis (2005, Phys. Rev. D 71, 103010), as per CAMB’s
CorrFuncFullSky. We keep the isotropic part of the deflection to all orders,F_l = exp(-l(l+1) sigma^2/2), and the anisotropic part to second order inc_l = l(l+1) C_gl,2 / 2. Withb_l = (2l+1)/(4pi)the lensed correlation functions areLxi = sum_l b_l C_l^TT F_l [d_00 + c_l d_{1-1} + c_l^2/4 (d_00 + d_{2-2})],xi_+ = sum_l b_l C_l^EE F_l [d_22 + c_l d_13 + c_l^2/4 (d_22 + d_04)],xi_- = sum_l b_l C_l^EE F_l [d_{2-2} + c_l/2 (d_{1-1} + d_{3-3}) + c_l^2/8 (2 d_{2-2} + d_00 + d_{4-4})],xi_X = sum_l b_l C_l^TE F_l [d_20 + c_l/2 (d_11 + d_{1-3}) + c_l^2/8 (3 d_20 + d_{2-4})],where
d_{mm'} = d^l_{mm'}(beta)are Wigner d-functions,sigma^2(beta) = C_gl(0) - C_gl(beta),C_gl = sum_l b_l l(l+1) C_l^psi d^l_11andC_gl,2is the same sum withd^l_{1-1}. Gauss-Legendre quadrature incos(beta)transforms them back:C~_l^TT = 2 pi int xi d^l_00,C~_l^TE = 2 pi int xi_X d^l_20,C~_l^EE +- C~_l^BB = 2 pi int xi_+- d^l_{2 +-2}. The d-functions depend only onl_maxand the node count, solensing_tables()builds them once, into the grid.lensed_spectra()then needs a few dozen matrix products per cosmology.Only the lensing correction goes through the quadrature. The unlensed correlation function is each sum above with
F_l = 1and noc_lterms, and it transforms back to the unlensed spectrum, soC~_l = C_l + 2 pi int (xi_lensed - xi_unlensed) d^l,with
F_l - 1in the leading term of each difference. The difference decays with angle:lensing_tables()drops the nodes beyondbeta_max(pi / 16in the grid) and tapers the weights to zero before it, which leaves the spectra within 5e-5 of the full range for a sixteenth of the nodes. The large low-lpower also stays out of the single-precision sums, whose rounding it would otherwise spread over the damping tail (4e-3 of TT atl = 2500).
- discocmb.lensed_spectra(cl, grid, *, chunk: int = 32) LensedSpectra[source]#
Return the lensed TT, TE, EE and BB of the unlensed
Spectracl.clcomes fromcmb_power_spectrum()orsolve_cmb()ongrid, whose Wigner tables the sums use, and each lensed spectrum is(n_c, grid.lmax + 1)in the units ofcl. The lensed spectra are good to a few hundred multipoles belowgrid.lmax: tol ~ 2500with the default grid.The sums run in the precision of the grid,
chunkcosmologies at a time. Only the lensing correction goes through the quadrature, so double precision moves the lensed spectra by 2e-6 and costs 55 ms more for a batch of 128.