Skip to content

Commit

Permalink
Adding the BICEP/Keck 2021 data release (#204)
Browse files Browse the repository at this point in the history
* BK15->BK18

* whitespace issue

* whitespace issue 2

* whitespace issue 3

* keep alias to BK15 to use map to covariances from the planck chain

* fix default decorrelation parameters

Co-authored-by: Dominic Beck <[email protected]>
Co-authored-by: Antony Lewis <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2021
1 parent 57a21cf commit 45d1d42
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cache:
- /home/travis/build/CosmoPars/packages/code
- /home/travis/build/CosmoPars/packages/data/planck_supp_data_and_covmats
- /home/travis/build/CosmoPars/packages/data/planck_2018/baseline
- /home/travis/build/CosmoPars/packages/data/bicep_keck_2015
- /home/travis/build/CosmoPars/packages/data/bicep_keck_2018
- /home/travis/build/CosmoPars/packages/data/bao_data
- /home/travis/build/CosmoPars/packages/data/sn_data
- /home/travis/build/CosmoPars/packages/data/des_data
Expand Down
2 changes: 1 addition & 1 deletion cobaya/cosmo_input/autoselect_covmat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

covmat_folders = [
"{%s}/data/planck_supp_data_and_covmats/covmats/" % packages_path_input,
"{%s}/data/bicep_keck_2015/BK15_cosmomc/planck_covmats/" % packages_path_input]
"{%s}/data/bicep_keck_2018/BK18_cosmomc/planck_covmats/" % packages_path_input]

# Global instance of loaded database, for fast calls to get_best_covmat in GUI
_loaded_covmats_database: Optional[List[Dict]] = None
Expand Down
16 changes: 8 additions & 8 deletions cobaya/cosmo_input/input_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@
"planck_2018_lowl.EE": None,
"planck_2018_highl_plik.TTTEEE": None,
"planck_2018_lensing.clik": None}},
"planck_2018_bk15": {
"desc": "Planck 2018 (Polarized CMB + lensing) + Bicep/Keck-Array 2015",
"planck_2018_bk18": {
"desc": "Planck 2018 (Polarized CMB + lensing) + Bicep/Keck-Array 2018",
"sampler": cmb_sampler_recommended,
"theory": {theo: {"extra_args": cmb_precision[theo]}
for theo in ["camb", "classy"]},
Expand All @@ -431,7 +431,7 @@
"planck_2018_lowl.EE": None,
"planck_2018_highl_plik.TTTEEE": None,
"planck_2018_lensing.clik": None,
"bicep_keck_2015": None}},
"bicep_keck_2018": None}},
"planck_2018_CMBmarged_lensing": {
"desc": "Planck 2018 CMB-marginalized lensing only",
"sampler": cmb_sampler_mcmc,
Expand Down Expand Up @@ -588,15 +588,15 @@
"theory": "classy",
"like_cmb": "planck_2018"}),
("planck_2018_bicep_camb", {
"desc": "Planck 2018 + BK15 (with tensor modes) with CAMB",
"desc": "Planck 2018 + BK18 (with tensor modes) with CAMB",
"theory": "camb",
"primordial": "SFSR_t",
"like_cmb": "planck_2018_bk15"}),
"like_cmb": "planck_2018_bk18"}),
("planck_2018_bicep_classy", {
"desc": "Planck 2018 + BK15 (with tensor modes) with CLASS",
"desc": "Planck 2018 + BK18 (with tensor modes) with CLASS",
"theory": "classy",
"primordial": "SFSR_t",
"like_cmb": "planck_2018_bk15"}),
"like_cmb": "planck_2018_bk18"}),
# CMB+BAO ######################################################
("planck_2018_BAO_camb", {
"desc": "Planck 2018 + BAO with CAMB",
Expand Down Expand Up @@ -709,7 +709,7 @@
"likelihood": {
"planck_2018_lowl.TT": None,
"planck_2018_lensing.native": None,
"bicep_keck_2015": None,
"bicep_keck_2018": None,
"sn.pantheon": None,
"bao.sdss_dr12_consensus_final": None,
"des_y1.joint": None}}
Expand Down
16 changes: 0 additions & 16 deletions cobaya/likelihoods/bicep_keck_2015/bicep_keck_2015.bibtex

This file was deleted.

42 changes: 20 additions & 22 deletions ...a/likelihoods/bicep_keck_2015/__init__.py → ...a/likelihoods/bicep_keck_2018/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
.. module:: bicep_keck_2015
.. module:: bicep_keck_2018
:Synopsis: Likelihood of BICEP2/Keck-Array, October 2018 (2015 data)
:Author: BICEP2/Keck team and Antony Lewis
:Synopsis: Likelihood of BICEP/Keck, October 2021 (2018 data)
:Author: BICEP/Keck Collaboration and Antony Lewis
.. |br| raw:: html
Expand All @@ -13,14 +13,14 @@
**If you use this likelihood, please cite it as:**
|br|
Keck Array and BICEP2 Collaborations,
`BICEP2 / Keck Array x: Constraints on Primordial Gravitational Waves
using Planck, WMAP, and New BICEP2/Keck Observations through the 2015 Season`
`(arXiv:1810.05216) <https://arxiv.org/abs/1810.05216>`_
`BICEP / Keck XIII: Improved Constraints on Primordial Gravitational Waves
using Planck, WMAP, and BICEP/Keck Observations through the 2018 Observing Season`
`(arXiv:2110.00483v1) <https://arxiv.org/abs/2110.00483>`_
Usage
-----
To use this likelihood, ``bicep_keck_2015``, you simply need to mention it in the
To use this likelihood, ``bicep_keck_2018``, you simply need to mention it in the
``likelihood`` block, or add them using the :doc:`input generator <cosmo_basic_runs>`.
The corresponding nuisance parameters will be added automatically,
Expand All @@ -33,7 +33,7 @@
but if you really need to, just copy the ``likelihood`` block into your input ``yaml``
file and modify whatever options you want (you can delete the rest).
.. literalinclude:: ../cobaya/likelihoods/bicep_keck_2015/bicep_keck_2015.yaml
.. literalinclude:: ../cobaya/likelihoods/bicep_keck_2018/bicep_keck_2018.yaml
:language: yaml
Expand All @@ -44,7 +44,7 @@
If are following the instructions there (you should!), you don't need to read the rest
of this section.
Manual installation of the BICEP2/Keck-Array likelihood
Manual installation of the BICEP/Keck likelihood
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Assuming you are installing all your
Expand All @@ -53,19 +53,19 @@
.. code:: bash
$ cd /path/to/likelihoods
$ mkdir bicep_keck_2015
$ cd bicep_keck_2015
$ wget http://bicepkeck.org/BK15_datarelease/BK15_cosmomc.tgz
$ tar xvf BK15_cosmomc.tgz
$ rm BK15_cosmomc.tgz
$ mkdir bicep_keck_2018
$ cd bicep_keck_2018
$ wget http://bicepkeck.org/BK18_datarelease/BK18_cosmomc.tgz
$ tar xvf BK18_cosmomc.tgz
$ rm BK18_cosmomc.tgz
After this, mention the path to this likelihood when you include it in an input file as
.. code-block:: yaml
likelihood:
bicep_keck_2015:
path: /path/to/likelihoods/bicep_keck_2015
bicep_keck_2018:
path: /path/to/likelihoods/bicep_keck_2018
"""

Expand All @@ -81,12 +81,12 @@
T_CMB_K = 2.7255 # fiducial CMB temperature


class bicep_keck_2015(CMBlikes):
class bicep_keck_2018(CMBlikes):
r"""
CMB power spectrum likelihood of Bicep2/Keck Array X \cite{Ade:2018gkx}.
CMB power spectrum likelihood of BICEP/Keck XIII, \cite{BK18}.
"""
install_options = {
"download_url": r"http://bicepkeck.org/BK15_datarelease/BK15_cosmomc.tgz"}
"download_url": r"http://bicepkeck.org/BK18_datarelease/BK18_cosmomc.tgz"}

def init_params(self, ini):
super().init_params(ini)
Expand All @@ -101,8 +101,6 @@ def init_params(self, ini):
i, default in zip([1, 2], [217., 353.])]
self.fpivot_sync_decorr = [ini.array_float('fpivot_sync_decorr', i, default) for
i, default in zip([1, 2], [22., 33.])]
self.lform_dust_decorr = ini.string('lform_dust_decorr', 'flat')
self.lform_sync_decorr = ini.string('lform_sync_decorr', 'flat')

def read_bandpass(self, fname):
bandpass: Any = Bandpass()
Expand All @@ -125,7 +123,7 @@ def read_bandpass(self, fname):
bandpass.th_sync = th_int / th0
# Calculate bandpass center-of-mass (i.e. mean frequency).
bandpass.nu_bar = np.dot(bandpass.dnu,
bandpass.R[:, 0] * bandpass.R[:, 1]) / np.dot(
bandpass.R[:, 0] * bandpass.R[:, 1]) / np.dot(
bandpass.dnu,
bandpass.R[:, 1])

Expand Down
18 changes: 18 additions & 0 deletions cobaya/likelihoods/bicep_keck_2018/bicep_keck_2018.bibtex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@article{BK18,
title = {Improved Constraints on Primordial Gravitational Waves using Planck, WMAP, and BICEP/Keck Observations through the 2018 Observing Season},
author = {Ade, P. A. R. and Ahmed, Z. and Amiri, M. and Barkats, D. and Thakur, R. Basu and Bischoff, C. A. and Beck, D. and Bock, J. J. and Boenish, H. and Bullock, E. and Buza, V. and Cheshire, J. R. and Connors, J. and Cornelison, J. and Crumrine, M. and Cukierman, A. and Denison, E. V. and Dierickx, M. and Duband, L. and Eiben, M. and Fatigoni, S. and Filippini, J. P. and Fliescher, S. and Goeckner-Wald, N. and Goldfinger, D. C. and Grayson, J. and Grimes, P. and Hall, G. and Halal, G. and Halpern, M. and Hand, E. and Harrison, S. and Henderson, S. and Hildebrandt, S. R. and Hilton, G. C. and Hubmayr, J. and Hui, H. and Irwin, K. D. and Kang, J. and Karkare, K. S. and Karpel, E. and Kefeli, S. and Kernasovskiy, S. A. and Kovac, J. M. and Kuo, C. L. and Lau, K. and Leitch, E. M. and Lennox, A. and Megerian, K. G. and Minutolo, L. and Moncelsi, L. and Nakato, Y. and Namikawa, T. and Nguyen, H. T. and O'Brient, R. and Ogburn, R. W. and Palladino, S. and Prouve, T. and Pryke, C. and Racine, B. and Reintsema, C. D. and Richter, S. and Schillaci, A. and Schwarz, R. and Schmitt, B. L. and Sheehy, C. D. and Soliman, A. and Germaine, T. St. and Steinbach, B. and Sudiwala, R. V. and Teply, G. P. and Thompson, K. L. and Tolan, J. E. and Tucker, C. and Turner, A. D. and Umilt\`a, C. and Verg\`es, C. and Vieregg, A. G. and Wandui, A. and Weber, A. C. and Wiebe, D. V. and Willmert, J. and Wong, C. L. and Wu, W. L. K. and Yang, H. and Yoon, K. W. and Young, E. and Yu, C. and Zeng, L. and Zhang, C. and Zhang, S.},
collaboration = {BICEP/Keck Collaboration},
journal = {Phys. Rev. Lett.},
volume = {127},
issue = {15},
pages = {151301},
numpages = {10},
year = {2021},
month = {Oct},
publisher = {American Physical Society},
doi = {10.1103/PhysRevLett.127.151301},
url = {https://link.aps.org/doi/10.1103/PhysRevLett.127.151301},
eprint = {2110.00483},
archivePrefix={arXiv},
primaryClass={astro-ph.CO}
}
38 changes: 22 additions & 16 deletions ...oods/bicep_keck_2015/bicep_keck_2015.yaml → ...oods/bicep_keck_2018/bicep_keck_2018.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# BICEP2/Keck Array September 2018 Data Products
# BICEP2/Keck Array X: Constraints On Primordial Gravitational Waves using Planck, WMAP, and New BICEP2/Keck Observations through the 2015 Season
# BICEP/Keck October 2021 Data Products
# BICEP/Keck XIII: Constraints on Primordial Gravitational Waves using Planck, WMAP, and BICEP/Keck Observations through the 2018 Observing Season
# http://bicepkeck.org/
#
# File: BK15.ini
# Date: 2018-08-30
# File: BK18lf.ini
# Date: 2021-10-03
#
# BICEP2/Keck Array likelihood, including external data from Planck and WMAP.
# BICEP/Keck likelihood, including external data from Planck and WMAP.
#
# Default settings for data selection and foreground nuisance parameters from
# the baseline analysis described in BICEP2/Keck VI.
# Default settings for data selection and foreground nuisance parameters from
# the baseline analysis described in BICEP/Keck XIII.
#
# * Includes BICEP2+KECK 95, 150, and 220 GHz maps
# * Additional maps are: Planck 30, 44, 70, 100, 143, 217, and 353 GHz;
# WMAP 23 GHz (K-band) and 33 GHz (Ka-band)
# * Includes BICEP2+KECK+BICEP3 95, 150, and 220 GHz maps
# * Additional maps are: Planck 30, 44, 143, 217, and 353 GHz;
# WMAP 23 GHz (K-band) and 33 GHz (Ka-band),
# apodized to BICEP3 map size
# * Maps apodized to BICEP3 map size are denoted with letter 'e',
# otherwise they are apodized to BICEP2/Keck map size instead.
# * By default uses B-modes only.
# * Uses all nine ell bins.
# * Gaussian priors on beta_dust and beta_sync.
Expand All @@ -23,11 +26,11 @@
# with B modes only)
# * Band center errors turned off by default.

# Path to the BK15_cosmomc folder under the official data distribution
# Path to the BK18_cosmomc folder under the official data distribution
path: null
dataset_file: BK15_cosmomc/data/BK15/BK15_dust.dataset
dataset_file: BK18_cosmomc/data/BK18lf_dust/BK18lf_dust.dataset
dataset_params:
maps_use: [BK15_95_B, BK15_150_B, BK15_220_B, W023_B, P030_B, W033_B, P044_B, P070_B, P100_B, P143_B, P217_B, P353_B]
maps_use: [BK18_K95_B, BK18_150_B, BK18_220_B, BK18_B95e_B, W023e_B, P030e_B, W033e_B, P044e_B, P143e_B, P217e_B, P353e_B]
use_min: 1
use_max: 9
map_separator: x
Expand All @@ -37,6 +40,9 @@ l_max: 2700
aliases: [BK15]
# Speed in evaluations/second
speed: 90
# Functional form of ell scaling for foreground decorrelation model.
lform_dust_decorr: lin
lform_sync_decorr: lin

params:
# dust power at ell=80, nu=353 GHz [uK^2]
Expand Down Expand Up @@ -84,11 +90,11 @@ params:
proposal: 0.01
latex: \alpha_{B,\mathrm{sync}}
# dust SED power law index
# relax beta_d prior - use flat prior on range [0.80, 2.40]
BBbetadust:
prior:
dist: norm
loc: 1.59
scale: 0.11
min: 0.80
max: 2.40
ref:
dist: norm
loc: 1.59
Expand Down
4 changes: 2 additions & 2 deletions docs/cosmo_external_likelihood_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ For example :class:`~likelihoods.planck_2018_lensing.native` (which is installed
params: !defaults [../planck_2018_highl_plik/params_calib]
The description of the data files and default settings are in the `dataset file <https://github.com/CobayaSampler/planck_supp_data_and_covmats/blob/master/lensing/2018/smicadx12_Dec5_ftl_mv2_ndclpp_p_teb_consext8.dataset>`_.
The :class:`bicep_keck_2015` likelihood provides a more complicated model that adds methods to implement the foreground model.
The :class:`bicep_keck_2018` likelihood provides a more complicated model that adds methods to implement the foreground model.

This example also demonstrates how to share nuisance parameter settings between likelihoods: in this example all the
Planck likelihoods depend on the calibration parameter, where here the default settings for that are loaded from the
Expand All @@ -264,7 +264,7 @@ Real-world examples

The simplest example are the :class:`H0` likelihoods, which are just implemented as simple Gaussians.

For an examples of more complex real-world CMB likelihoods, see :class:`bicep_keck_2015` and the lensing likelihood shown above (both using CMBlikes format), or :class:`Planck2018CamSpecPython` for a full Python implementation of the
For an examples of more complex real-world CMB likelihoods, see :class:`bicep_keck_2018` and the lensing likelihood shown above (both using CMBlikes format), or :class:`Planck2018CamSpecPython` for a full Python implementation of the
multi-frequency Planck likelihood (based from :class:`DataSetLikelihood`). The :class:`PlanckPlikLite`
likelihood implements the plik-lite foreground-marginalized likelihood. Both the plik-like and CamSpec likelihoods
support doing general multipole and spectrum cuts on the fly by setting override dataset parameters in the input .yaml.
Expand Down
2 changes: 1 addition & 1 deletion docs/installation_cosmo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Within ``/path/to/packages``, the following file structure will be created, cont
│ └── [...]
└── data
├── planck_2018
├── bicep_keck_2015
├── bicep_keck_2018
└── [...]
.. note::
Expand Down
4 changes: 2 additions & 2 deletions docs/likelihood_bk.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CMB from BICEP2/Keck-Array Oct 2018
CMB from BICEP/Keck XIII October 2021
===================================

.. automodule:: cobaya.likelihoods.bicep_keck_2015
.. automodule:: cobaya.likelihoods.bicep_keck_2018
:noindex:
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tries to evaluate the BK15 likelihood at a reference point
# Tries to evaluate the BK18 likelihood at a reference point

from copy import deepcopy
from .common_cosmo import body_of_test
Expand All @@ -11,14 +11,14 @@
classy_extra.update({"halofit_min_k_max": 20})


def test_bicep_keck_2015_camb(packages_path, skip_not_installed):
def test_bicep_keck_2018_camb(packages_path, skip_not_installed):
info_theory = {"camb": {"extra_args": camb_extra}}
body_of_test(packages_path, test_point, lik_info, info_theory, chi2,
extra_model={"primordial": "SFSR_t"},
skip_not_installed=skip_not_installed)


def test_bicep_keck_2015_classy(packages_path, skip_not_installed):
def test_bicep_keck_2018_classy(packages_path, skip_not_installed):
info_theory = {"classy": {"extra_args": classy_extra}}
# extra tolerance for CLASS
chi2_classy = deepcopy(chi2)
Expand All @@ -28,10 +28,10 @@ def test_bicep_keck_2015_classy(packages_path, skip_not_installed):
skip_not_installed=skip_not_installed)


lik_info = {"bicep_keck_2015": {}}
lik_info = {"bicep_keck_2018": {}}

# NB: chi2 obtained using CAMB w HMcode
chi2 = {"bicep_keck_2015": 735.187, "tolerance": 0.16}
chi2 = {"bicep_keck_2018": 543.25, "tolerance": 0.16}

test_point = {
"omegabh2": 0.2235620E-01,
Expand Down

0 comments on commit 45d1d42

Please sign in to comment.