plancklens.qecl
- class plancklens.qecl.library(lib_dir, qeA, qeB, mc_sims_mf)[source]
QE estimators (cross-)power spectra library template.
This combines two QE estimators instances and a set of mean-field estimates to produce raw power spectra.
- Parameters:
lib_dir – spectra will be cached in lib_dir
qeA – first QE instance (from plancklens.qest)
qeB – second QE instance
mc_sims_mf – simulation indices to use for the mean-field subtraction. mc_sims_mf[0::2] are used on the first spectrum leg, mc_sims_mf[1::2] on the second.
This simple implementation produces spectra as \(\frac{1}{(2L + 1)f_{\rm sky}} \sum_{M} \hat \phi_{LM}^A \hat \phi_{LM}^{B\dagger}\) after mean-field subtraction.
- get_sim_qcl(k1, idx, k2=None, lmax=None, recache=False, calc=True)[source]
Returns QE (cross-)power spectrum for a simulation index.
- Parameters:
k1 – QE anisotropy key 1
idx – simulation index
k2 – QE anisotropy key 2 (defaults to k1)
lmax – optionally reduce the output to multipole lmax
calc – calculates it if not done already. Otherwise throws an error if set to False
- Returns:
QE power spectrum (1d array)
- class plancklens.qecl.average(lib_dir, qcls_lib)[source]
From a list of QE spectra libraries, produces a qecl average library.
- Parameters:
lib_dir – spectra will be cached in lib_dir
qcls_lib – list of plancklens.qecl instances
- get_sim_qcl(k1, idx, k2=None, lmax=None)[source]
Returns QE (cross-)power spectrum average for a simulation index.
- Parameters:
k1 – QE anisotropy key 1
idx – simulation index
k2 – QE anisotropy key 2 (defaults to k1)
lmax – optionally reduce the output to multipole lmax
- Returns:
QE power spectrum average (1d array)
- get_sim_stats_qcl(k1, mc_sims, k2=None, recache=False, lmax=None)[source]
Returns the sim-average of the input plancklens.qecl list QE power spectra average
- Parameters:
k1 – QE anisotropy key 1
mc_sims – the simulation indices to average the spectra over
k2 – QE anisotropy key 2 (defaults to k1)
- Returns:
plancklens.utils.stats instance