plancklens.n1.n1

\(N^{(1)}_L\) quadratic estimator bias calculation module.

This module contains the \(N^{(1)}_L\) bias calculation scripts (for lensing and other quadratic estimators)

All calculations are performed using the flat-sky approximation from Fortran code. The Fortran code implements Eq. A.3. of the 2018 Planck lensing paper https://arxiv.org/abs/1807.06210, with integration on \(\bf{\ell_1}\) and the anisotropy source wavevector.

Note

For composed estimators, the N1 for all pairs will be calculated and stored in the process

Note

The input spectra are those used in QE weights and the CMB responses (e.g. \(\tilde C^{T\nabla T}_\ell\))

class plancklens.n1.n1.library_n1(lib_dir, cltt, clte, clee, lmaxphi=2500, dL=10, lps=None)[source]

Flexible library for calculation of the N1 quadratic estimator biases

Parameters:
  • lib_dir – results will be stored there

  • cltt – CMB TT spectrum (used for map CMB spectrum and QE weights)

  • clte – CMB TE spectrum (used for map CMB spectrum and QE weights)

  • clee – CMB EE spectrum (used for map CMB spectrum and QE weights)

  • lmaxphi – maximum multipole of the anistropy source (clpp for standard lensing N1) to consider

  • dL – flat-sky numerical integration parameter, see n1.f90

  • lps – flat-sky numerical integration parameter, see n1.f90

get_n1(kA, k_ind, cl_kind, ftlA, felA, fblA, Lmax, kB=None, ftlB=None, felB=None, fblB=None, clttfid=None, cltefid=None, cleefid=None, n1_flat=<function library_n1.<lambda>>, recache=False, remove_only=False, sglLmode=True)[source]

Calls a N1 bias

Parameters:
  • kA – qe_key of QE spectrum first leg

  • k_ind – anisotropy source key (‘p’, for standard lensing N1)

  • cl_kind – spectrum of anisotropy source (‘p’, for standard lensing N1)

  • ftlA – first leg T-filtering isotropic approximation (typically \(\frac{1}{C_\ell^{TT} + N_\ell^{TT}}\))

  • felA – first leg E-filtering isotropic approximation (typically \(\frac{1}{C_\ell^{EE} + N_\ell^{EE}}\))

  • fblA – first leg B-filtering isotropic approximation (typically \(\frac{1}{C_\ell^{BB} + N_\ell^{BB}}\))

  • Lmax – maximum multipole of output N1

  • kB (optional) – qe_key of QE spectrum second leg (if different from the first)

  • ftlB (optional) – second leg T-filtering isotropic approximation (if different from the first)

  • felB (optional) – second leg E-filtering isotropic approximation (if different from the first)

  • fblB (optional) – second leg B-filtering isotropic approximation (if different from the first)

  • clttfid (optional) – CMB TT spectrum used in QE weights (if different from instance cltt for map-level CMB spectrum)

  • cltefid (optional) – CMB TE spectrum used in QE weights (if different from instance clte for map-level CMB spectrum)

  • cleefid (optional) – CMB EE spectrum used in QE weights (if different from instance clee for map-level CMB spectrum)

  • n1_flat (optional) – function used to flatten the discretized output before returning splined entire array

Returns:

N1 bias in the form of a numpy array of size Lmax + 1

Note

This can be called with MPI using a number of processes; in this case the calculations for each multipole will be distributed among these.