plancklens.qest¶
Quadratic estimation implementation module.
-
qest.
eval_qe
(qe_key, lmax_ivf, cls_weight, get_alm, nside, lmax_qlm, verbose=True)[source]¶ Evaluates a quadratic estimator gradient and curl terms.
(see ‘library’ below for QE estimation coupled to CMB inverse-variance filtered simulation libraries, whose implementation can be faster for some estimators.)
Parameters: - qe_key – QE key defining the estimator (as defined in the qresp module), e.g. ‘ptt’ for lensing TT estimator
- lmax_ivf – CMB multipoles up to lmax are used in the QE
- cls_weight – set of CMB spectra entering the QE estimator weights
- get_alm – callable with ‘t’, ‘e’, ‘b’ arguments, returning the corresponding inverse-variance filtered CMB map
- nside – the estimator are calculated in position space at healpy resolution nside.
- lmax_qlm – gradient and curl terms are obtained up to multipole lmax_qlm.
Returns: glm and clm healpy arrays (gradient and curl terms of the QE estimate)
-
class
qest.
library
(lib_dir, ivfs1, ivfs2, nside, clte=None, lmax_qlm=None, resplib=None)[source]¶ From two inverse-variance filtered CMB simulation libraries returns a QE evaluation library.
Parameters: - lib_dir – QE estimates will be stored there.
- ivfs1 – inverse-variance filtering instance of the QE 1st leg.
- ivfs2 – inverse-variance filtering instance of the QE 2nd leg.
- nside – QE estimates are obtained from real-space healpy maps at resolution nside
- clte (optional) – TE CMB spectrum weight. If set this is used to build \(X^{\rm WF}\) from \(\bar X\). Defaults to None, which is adequate for the MV estimator if T and P maps are jointly filtered.
- lmax_qlm (optional) – QE estimates are computed up to multipole lmax_qlm (defaults to 3 * nside -1).
- resplib (optional) – response library with get_response methods. Only used for bias_hardened estimators.
-
get_sim_qlm
(k, idx, lmax=None)[source]¶ Returns a QE estimate, by computing and caching it if not done previously.
Parameters: - k – quadratic estimator key
- idx – simulation index
- lmax – optionally reduces the lmax of the output healpy array.
-
get_sim_qlm_mf
(k, mc_sims, lmax=None)[source]¶ Returns a QE mean-field estimate, by averaging QE estimates from a set simulations (caches the result).
Parameters: - k – quadratic estimator key
- mc_sims – simulation indices to use for the estimate.
- lmax – optionally reduces the lmax of the output healpy array.