CosmoFit.PlanckLiteLikelihood

class CosmoFit.PlanckLiteLikelihood(cosmology, version='planck2018', spectra='TTTEEE', use_low_ell=False, lens_potential_accuracy=1)[source]

Bases: BaseLikelihood

Planck 2018 plik_lite binned TT/TE/EE bandpowers against a Boltzmann-computed C_l spectrum.

Parameters:
  • cosmology – Cosmology model instance. Must be one CAMB can represent (LCDM, or any model with a w(z)); anything else raises BoltzmannError at construction rather than mid-chain.

  • version (str, optional) – Dataset version.

  • spectra (str, optional) – Which spectra to use: "TTTEEE" (default, all 613 bandpowers), or "TT" / "TE" / "EE" for one alone. Selecting a subset takes the corresponding block of the covariance – correctly dropping, not zeroing, the cross-spectrum correlations.

  • lens_potential_accuracy (int, optional) – Passed to CAMBBackend.

  • use_low_ell (bool)

Warning

Do not combine "planck_lite" with "planck". They are the same Planck data twice – the distance priors are a compression of these bandpowers – and using both counts the entire CMB dataset two ways, once in full and once in summary. Pick the compression (fast, every model) or the spectra (slow, complete), not both.

__init__(cosmology, version='planck2018', spectra='TTTEEE', use_low_ell=False, lens_potential_accuracy=1)[source]
Parameters:
  • version (str)

  • spectra (str)

  • use_low_ell (bool)

  • lens_potential_accuracy (int)

Methods

__init__(cosmology[, version, spectra, ...])

chi2()

Chi-square statistic.

log_likelihood()

Return log-likelihood.

model()

Predicted bandpowers for the current cosmology.

predictions()

Alias for model().

residuals()

Data minus model bandpower residuals.

summary()

Return a summary of the likelihood evaluation.

Attributes

n_data

Number of data points.

name_and_size

Name together with the number of data points.

observable