Cobaya: No DR16 BAO datasets implemented

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
alex woodfinden
Posts: 1
Joined: July 28 2022
Affiliation: U Waterloo

Cobaya: No DR16 BAO datasets implemented

Post by alex woodfinden » July 28 2022

I've installed cobaya as well as the steps for installing cosmological codes and data. Using cobaya-cosmo-generator I've made and tried to run the following .yaml file:

Code: Select all

theory:
  camb:
    extra_args:
      num_massive_neutrinos: 1
      nnu: 3.046
likelihood:
  bao.sixdf_2011_bao: null
  bao.sdss_dr7_mgs: null
  bao.sdss_dr16_baoplus_lrg: null
  bao.sdss_dr16_baoplus_elg: null
  bao.sdss_dr16_baoplus_qso: null
  bao.sdss_dr16_baoplus_lyauto: null
  bao.sdss_dr16_baoplus_lyxqso: null
params:
  logA:
    prior:
      min: 1.61
      max: 3.91
    ref:
      dist: norm
      loc: 3.05
      scale: 0.001
    proposal: 0.001
    latex: \log(10^{10} A_\mathrm{s})
    drop: true
  As:
    value: 'lambda logA: 1e-10*np.exp(logA)'
    latex: A_\mathrm{s}
  ns:
    prior:
      min: 0.8
      max: 1.2
    ref:
      dist: norm
      loc: 0.965
      scale: 0.004
    proposal: 0.002
    latex: n_\mathrm{s}
  H0:
    prior:
      min: 20
      max: 100
    ref:
      dist: norm
      loc: 67
      scale: 2
    proposal: 2
    latex: H_0
  ombh2:
    prior:
      min: 0.005
      max: 0.1
    ref:
      dist: norm
      loc: 0.0224
      scale: 0.0001
    proposal: 0.0001
    latex: \Omega_\mathrm{b} h^2
  omch2:
    prior:
      min: 0.001
      max: 0.99
    ref:
      dist: norm
      loc: 0.12
      scale: 0.001
    proposal: 0.0005
    latex: \Omega_\mathrm{c} h^2
  omegam:
    latex: \Omega_\mathrm{m}
  omegamh2:
    derived: 'lambda omegam, H0: omegam*(H0/100)**2'
    latex: \Omega_\mathrm{m} h^2
  mnu: 0.06
  omega_de:
    latex: \Omega_\Lambda
  YHe:
    latex: Y_\mathrm{P}
  Y_p:
    latex: Y_P^\mathrm{BBN}
  DHBBN:
    derived: 'lambda DH: 10**5*DH'
    latex: 10^5 \mathrm{D}/\mathrm{H}
  tau:
    prior:
      min: 0.01
      max: 0.8
    ref:
      dist: norm
      loc: 0.055
      scale: 0.006
    proposal: 0.003
    latex: \tau_\mathrm{reio}
  zrei:
    latex: z_\mathrm{re}
sampler:
  mcmc:
    covmat: auto
This results in the following error:

Code: Select all

 2022-07-28 10:49:28,420 [tools] *ERROR* Traceback (most recent call last):
  File "/project/6033532/woodfiaj/cobaya_plots/cobEnv/lib/python3.9/site-packages/cobaya/tools.py", line 227, in get_class
    import_module(module_name)
  File "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/python/3.9.6/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'bao'

 2022-07-28 10:49:28,420 [tools] *ERROR* There was a problem when importing likelihood 'bao.sdss_dr16_baoplus_lrg':
 2022-07-28 10:49:28,420 [input] *ERROR* Failed to get defaults for component or class 'bao.sdss_dr16_baoplus_lrg' [No module named 'bao']
To try to fix this, I've followed the steps for manual installation of BAO likelihood data here, resulting in the same error: https://cobaya.readthedocs.io/en/latest/likelihood_bao.html#installation

Checking if the cosmo data and likelihoods are installed properly seems to show no issues, but I do not see dr16 loaded here:

Code: Select all

cobaya-install cosmo
[install] Installing basic cosmological packages.
[install] Installing external packages at '/lustre06/project/6033532/woodfiaj/SDSS-void-consensus/packages'

================================================================================
theory:camb
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
theory:classy
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
likelihood:planck_2018_lowl.TT
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
likelihood:planck_2018_lensing.native
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
likelihood:bicep_keck_2015
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
likelihood:sn.pantheon
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
likelihood:bao.sdss_dr12_consensus_final
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
likelihood:des_y1.joint
================================================================================

[install] Checking if dependencies have already been installed...
[install] External dependencies for this component already installed.
[install] Doing nothing.

================================================================================
* Summary * 
================================================================================

[install] All requested components' dependencies correctly installed.
[install] The installation path has been written into the global config file: 
Is there an additional step to load in dr16 data/likelihoods that I am missing? Removing the dr16 datasets from the .yaml file results in everything running correctly and without errors as expected.

Post Reply