plancklens.filt.filt_simple
simple CMB filtering module.
This module collects a couple of fast (non-iterative) filtering methods.
- class filt_simple.library_jTP(lib_dir, sim_lib, cl_weights, soltn_lib=None, cache=True)[source]
Template class for CMB inverse-variance and Wiener-filtering library.
This one is suitable whenever the temperature and polarization maps are jointly filtered.
- Parameters:
lib_dir (str) – directory where hashes and filtered maps will be cached.
sim_lib – simulation library instance. sim_lib must have get_sim_tmap and get_sim_pmap methods.
cl_weights – CMB spectra, used to compute the Wiener-filtered CMB from the inverse variance filtered maps.
- get_fal()[source]
Isotropic matrix approximation to inverse variance filtering
\(F_\ell \sim (C_\ell + N_\ell / b_\ell^2)^{-1}\)
Output is dictionary with the usual ‘tt’, ‘ee’, ‘te’, ‘bb’, … keys.
- get_sim_blm(idx)[source]
Returns an inverse-filtered B-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
inverse-filtered B-polarization healpy alm array
- get_sim_bmliklm(idx)[source]
Returns a Wiener-filtered B-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
Wiener-filtered B-polarization healpy alm array
- get_sim_elm(idx)[source]
Returns an inverse-filtered E-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
inverse-filtered E-polarization healpy alm array
- get_sim_emliklm(idx)[source]
Returns a Wiener-filtered E-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
Wiener-filtered E-polarization healpy alm array
- class filt_simple.library_sepTP(lib_dir, sim_lib, cl_weights, soltn_lib=None, cache=True)[source]
Template class for CMB inverse-variance and Wiener-filtering library.
This is suitable whenever the temperature and polarization maps are independently filtered.
- Parameters:
lib_dir (str) – directory where hashes and filtered maps will be cached.
sim_lib – simulation library instance. sim_lib must have get_sim_tmap and get_sim_pmap methods.
cl_weights – CMB spectra, used to compute the Wiener-filtered CMB from the inverse variance filtered maps.
- get_fbl()[source]
Isotropic approximation to B-polarization inverse variance filtering.
\(F^{B}_\ell = (C_\ell^{BB} + N^{B}_\ell / b_\ell^2)^{-1}\)
- get_fel()[source]
Isotropic approximation to E-polarization inverse variance filtering.
\(F^{E}_\ell = (C_\ell^{EE} + N^{E}_\ell / b_\ell^2)^{-1}\)
- get_ftl()[source]
Isotropic approximation to temperature inverse variance filtering.
\(F^{T}_\ell = (C_\ell^{TT} + N^{T}_\ell / b_\ell^2)^{-1}\)
- get_sim_blm(idx)[source]
Returns an inverse-filtered B-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
inverse-filtered B-polarization healpy alm array
- get_sim_bmliklm(idx)[source]
Returns a Wiener-filtered B-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
Wiener-filtered B-polarization healpy alm array
- get_sim_elm(idx)[source]
Returns an inverse-filtered E-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
inverse-filtered E-polarization healpy alm array
- get_sim_emliklm(idx)[source]
Returns a Wiener-filtered E-polarization simulation.
- Parameters:
idx – simulation index
- Returns:
Wiener-filtered E-polarization healpy alm array
- class filt_simple.library_fullsky_sepTP(lib_dir, sim_lib, nside, transf: ndarray, cl_len, ftl, fel, fbl, cache=False)[source]
Full-sky isotropic filtering instance.
- Parameters:
lib_dir – directory where hashes and filtered maps will be cached.
sim_lib – simulation library instance to inverse-filter
nside – healpix resolution of the simulation library
cl_len – CMB spectra, used to compute the Wiener-filtered CMB from the inverse variance filtered maps.
transf – fiducial transfer function of the CMB maps. (if dict, then must have keys ‘t’ ‘e’ and ‘b’ for individual transfer functions)
ftl (1d-array) – isotropic filtering array for temperature (filtered tlm’s are ftl * tlm of the data)
fel (1d-array) – isotropic filtering array for E-pol. (filtered elm’s are fel * elm of the data)
fbl (1d-array) – isotropic filtering array for B-po. (filtered blm’s are fbl * blm of the data)
cache – filtered alm’s will be cached if set.
- class filt_simple.library_apo_sepTP(lib_dir, sim_lib, apomask_path, cl_len, transf, ftl, fel, fbl, cache=False)[source]
Library to perform inverse variance filtering on the sim_lib library using simple mask apo and isotropic filtering.
- Parameters:
lib_dir – directory where hashes and filtered maps will be cached.
sim_lib – simulation library instance to inverse-filter
apomask_path – path of the (presumably apodized) mask
cl_len – CMB spectra, used to compute the Wiener-filtered CMB from the inverse variance filtered maps.
transf – fiducial transfer function of the CMB maps.
ftl (1d-array) – isotropic filtering array for temperature (filtered tlm’s are ftl * tlm of the data)
fel (1d-array) – isotropic filtering array for E-pol. (filtered elm’s are fel * elm of the data)
fbl (1d-array) – isotropic filtering array for B-po. (filtered blm’s are fbl * blm of the data)
cache – filtered alm’s will be cached if set.