CMBCov#

class cosmicjellyfish.CMBsurvey.CMB_cov.CMBCov(cosmopars, print_info_specs=False, *, configuration=None)[source]#

Bases: object

CMB covariance and derivatives for Fisher forecasts.

This class: - computes fiducial CMB spectra (via CMB_obs.ComputeCls) - adds instrumental noise given self.specs beam/noise settings - constructs a per-ell covariance matrix - computes numerical derivatives w.r.t. self.freeparams

Notes

The CMB implementation currently supports the observables CMB_T, CMB_E, CMB_B. Lensing spectra (e.g. phi-phi) are not implemented yet.

getcls(allpars)[source]#

Compute (noise-free) CMB C_ell for a given parameter dictionary.

getclsnoise(cls)[source]#

Noise value

Parameters:

cls (dict) – cls dictionary

Returns:

Noise value[ell,bin]

Return type:

array

Note

Implements the following equation:

\[N_\ell^X = ...\]
sum_inv_squares(arr)[source]#

Combine multiple channels by inverse-variance weighting.

sum_inv_linear(arr)[source]#

Combine channels as inverse-noise weighted sum.

get_covmat(noisy_cls)[source]#

Data covariance

Parameters:

noisy_cls (dict) – dictionary containing cls with noise

Returns:

  • list

  • data covariance matrix

compute_covmat()[source]#

Compute fiducial CMB spectra, add noise, and build covariance matrices.

Returns:

(noisy_cls, covvec) where noisy_cls is a dict of spectra arrays and covvec is a list of per-ell pandas DataFrames.

Return type:

tuple

compute_derivs(print_info_specs=False, *, derivative_provider=None)[source]#

Compute numerical derivatives of CMB spectra w.r.t. free parameters.