plancklens.filt.filt_cinv
conjugate gradient solver CMB filtering module.
- class plancklens.filt.filt_cinv.cinv_p(lib_dir, lmax, nside, cl, transf, ninv, pcf='default', chain_descr=None, transf_blm=None, marge_qmaps=(), marge_umaps=())[source]
Polarization-only inverse-variance (or Wiener-)filtering instance.
- Parameters:
lib_dir – mask and other things will be cached there
lmax – filtered alm’s are reconstructed up to lmax
nside – healpy resolution of maps to filter
cl – fiducial CMB spectra used to filter the data (dict with ‘tt’ key)
transf – CMB E-mode polarization transfer function (array)
ninv – inverse pixel variance maps. Must be a list of either 3 (QQ, QU, UU) or 1 (QQ = UU noise) elements. These element are themselves list of paths or of healpy maps with consistent nside.
transf_blm (optional) – B-polarization transfer function (if different from E-mode one)
Note
This implementation now supports template projection
- class plancklens.filt.filt_cinv.cinv_t(lib_dir, lmax, nside, cl, transf, ninv, rescal_cl='default', marge_monopole=True, marge_dipole=True, marge_maps=(), pcf='default', chain_descr=None)[source]
Temperature-only inverse-variance (or Wiener-)filtering instance.
- Parameters:
lib_dir – mask and other things will be cached there
lmax – filtered alm’s are reconstructed up to lmax
nside – healpy resolution of maps to filter
cl – fiducial CMB spectra used to filter the data (dict with ‘tt’ key)
transf – CMB maps transfer function (array)
ninv – inverse pixel variance map. Must be a list of paths or of healpy maps with consistent nside.
rescal_cl – isotropic rescaling of the map prior the cg inversion. This just makes the convergence criterium change a bit
Note
The only difference of the original plancklens filter is the rescaling of the maps. In effect, the modes of :math’D_ell rather than :math’C_ell are reconstructed This changes nothing to the iterations, but gives the dot product testing for convergence more sensitvity to relevant scales
- class plancklens.filt.filt_cinv.library_cinv_jTP(lib_dir: str, sim_lib, cinv_jtp: cinv_tp, cl_weights: dict, soltn_lib=None)[source]
Library to perform inverse-variance filtering of a simulation library.
Suitable for separate temperature and polarization filtering.
- Parameters:
lib_dir (str) – a place to cache the maps
sim_lib – simulation library instance (requires get_sim_tmap, get_sim_pmap methods)
cinv_jtp – temperature and pol joint filtering library
cl_weights – spectra used to build the Wiener filtered leg from the inverse-variance maps
soltn_lib (optional) – simulation libary providing starting guesses for the filtering.
- class plancklens.filt.filt_cinv.library_cinv_sepTP(lib_dir, sim_lib, cinvt: cinv_t, cinvp: cinv_p, cl_weights: dict, soltn_lib=None)[source]
Library to perform inverse-variance filtering of a simulation library.
Suitable for separate temperature and polarization filtering.
- Parameters:
lib_dir (str) – a
sim_lib – simulation library instance (requires get_sim_tmap, get_sim_pmap methods)
cinvt – temperature-only filtering library
cinvp – poalrization-only filtering library
soltn_lib (optional) – simulation libary providing starting guesses for the filtering.
- get_fbl(lmax=None)[source]
Isotropic approximation to B-polarization inverse variance filtering.
\(F^{B}_\ell = (C_\ell^{BB} + N^{B}_\ell / b_\ell^2)^{-1}\)