plancklens.qresp

Module for QE response calculations.

In plancklens a QE is often described by a short string.

For example ‘ptt’ stands for lensing (or lensing gradient mode) from temperature x temperature.

Anisotropy source keys are a one-letter string including

‘p’ (lensing gradient) ‘x’ (lensing curl) ‘s’ (point sources) ‘f’ (modulation field) ‘a’ (polarization rotation)

Typical keys include then:

‘ptt’, ‘xtt’, ‘stt’, ‘ftt’ for the corresponding QEs from temperature only ‘p_p’, ‘x_p’, ‘f_p’, ‘a_p’ for the corresponding QEs from polarization only (combining EE EB and BB if relevant) ‘p’, ‘x’, ‘f’, ‘a’, ‘f’ … for the MV (or GMV) combination ‘p_eb’, … for the EB estimator (this is the symmetrized version (‘peb’ + ‘pbe’) / 2 so that E and B appear each once on the gradient and inverse-variance filtered leg) etc

Bias-hardening can be included by inserting ‘_bh_’.

E.g. ‘ptt_bh_s’ is the lensing TT QE bias-hardened against point source contamination using the ‘stt’ estimator

Responses method takes as input the QE weights (typically the lensed CMB spectra) and the filtering cls (‘fals’) which describes the filtering applied to the maps (the \((C + N)^{-1}\) operation) See examples/get_N0s.py to see how these are typically calculated for independent or joint temperature and polarization filtering

qresp.get_response(qe_key, lmax_ivf, source, cls_weight, cls_cmb, fal, fal_leg2=None, lmax_ivf2=None, lmax_qlm=None, transf=None)[source]

QE response calculation

Parameters:
  • qe_key – Quadratic estimator key (see this module docstring for descriptions)

  • lmax_ivf – max. CMB multipole used in the QE

  • source – anisotropy source key

  • cls_weight (dict) – fiducial spectra entering the QE weights (numerator in Eq. 2 of https://arxiv.org/abs/1807.06210)

  • cls_cmb (dict) – CMB spectra entering the CMB response (in principle lensed spectra, or grad-lensed spectra)

  • fal (dict) – (isotropic approximation to the) filtering cls. e.g. fal[‘tt’] \(= \frac {1} {C^{\rm TT}_\ell + N^{\rm TT}_\ell / b^2_\ell}\) for temperature if filtered independently from polarization.

  • fal_leg2 (dict) – Same as fal but for the second leg, if different.

  • lmax_ivf2 (optional) – max. CMB multipole used in the QE on the second leg (if different to lmax_ivf)

  • lmax_qlm (optional) – responses are calculated up to this multipole. Defaults to lmax_ivf + lmax_ivf2

Note

The result is not symmetrized with respect to the ‘fals’, if not the same on the two legs. In this case you probably want to run this twice swapping the fals in the second run.

class qresp.resp_lib_simple(lib_dir, lmax_ivf, cls_weight, cls_cmb, fal, lmax_qlm, transf=None)[source]

QE responses calculation library.

This wraps the get_response function and caches the outputs.

Parameters:
  • lib_dir – outputs are cached in this directory

  • lmax_ivf – max. CMB multipole used in the QE

  • cls_weight (dict) – fiducial spectra entering the QE weights (numerator in Eq. 2 of https://arxiv.org/abs/1807.06210)

  • cls_cmb (dict) – CMB spectra entering the CMB response (in principle lensed spectra, or grad-lensed spectra)

  • fal (dict) – (isotropic approximation to the) filtering cls. e.g. fal[‘tt’] \(= \frac {1} {C^{TT}_\ell + N^{\rm TT}_\ell / b^2_\ell}\) for temperature if filtered independently from polarization.

  • lmax_qlm (optional) – responses are calculated up to this multipole. Defaults to lmax_ivf + lmax_ivf2

get_response(k, ksource, recache=False)[source]
Parameters:
  • k – QE anisotropy key

  • ksource – CMB anisotropy source key

Returns:

Response array