planck_py

Lightweight python-based Planck likelihood code

File

likelihood/planck_py/planck_py_interface.py

Attribution

Heather Prince, Jo Dunkley (Library)

CosmoSIS Team (Interface)

URL

https://github.com/heatherprince/planck-lite-py

Citations

Phys. Rev. D 100, 083502

https://doi.org/10.1051/0004-6361/201936386

https://doi.org/10.1051/0004-6361/201526926

The lite version of the Planck likelihoods can be more useful than the main version both because it is purely Gaussian and so can be easily used in Fisher matrix calculations, and because it is much cleaner and easier to understand.

Assumptions

  • Planck 2015 or 2018 data

  • Compresed form of Planck likelihoods

Setup Parameters

Name

Type

Default

Description

year

int

Whether to use 2015 or 2018 data

spectra

str

Which set of spectra to use, TT or TTTEEE

use_low_ell_bins

bool

Whether to include ell < 30 data points

data_directory

[module dir]/data

Directory to search for data

use_data_from_test

str

Set to a directory generated by the CosmoSIS test sampler to use it as mock observations instead of true Planck data

x_name

str

ell

Datablock name for CMB ell values

y_section

str

cmb_cl

Datablock section for CMB spectra

like_name

str

planck

Name for the saved output likelihood

likelihood_only

bool

False

Skip saving everything except the likelihood. This prevents you from using e.g. the Fisher matrix sampler but can be faster for quick likelihoods

include_norm

bool

False

Include the normalizing constant at the start of the likelihood. May be needed when comparing models.

Input values

Section

Name

Type

Default

Description

cmb_cl

ell

real 1d

CMB power spectrum ell values of other inputs

TT

real 1d

CMB temperature power spectrum in ell(ell+1)/2pi units

TE

real 1d

CMB temperature-E-mode polarization cross power spectrum in ell(ell+1)/2pi units

EE

real 1d

CMB E-mode polaration power spectrum in ell(ell+1)/2pi units

Output values

Output values

Section

Name

Type

Description

likelihoods

planck_like

real

Planck likelihood for given selection

data_vector

planck_covariance

real 2d

Fixed covariance matrix, only if likelihood_only=F

planck_data

real 1d

Concatenated D_ell, only if likelihood_only=F

planck_simulation

real 1d

Simulated D_ell data vector including simulated noise for e.g. ABC, only if likelihood_only=F

planck_theory

real 1d

Predicted theory values D_ell only if likelihood_only=F

planck_chi2

real

chi^2 value, only if likelihood_only=F