Cobaya + camb: can't set k_hunit and hubble_units to True?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Alex Krolewski
Posts: 11
Joined: November 07 2019
Affiliation: UC Berkeley

Cobaya + camb: can't set k_hunit and hubble_units to True?

Post by Alex Krolewski » March 10 2021

I am trying to set hubble_units=True and k_hunit=True in my _theory specification of the likelihood, like so:
_theory={'Pk_interpolator': {'z': np.linspace(0,zmax,Nz),
'k_max': kmax, 'nonlinear': False,
'hubble_units': True,'k_hunit': True,
'vars_pairs': [[var,var]]}}):
'''Function for the likelihood.'''

This code had worked fine on a previous install (cobaya 2.1.0) but when I tried an install on a different machine, with the same version of cobaya, I got the following error:

[camb] *ERROR* hubble_units and k_hunit must be Falsefor consistency

Is there some reason why this error could be happening with the same version of cobaya, i.e. different versions of CAMB? And why would I be unable to set hubble_units and k_hunit to True?

Antony Lewis
Posts: 1936
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: Cobaya + camb: can't set k_hunit and hubble_units to True?

Post by Antony Lewis » March 12 2021

Cobaya now internally always calculates P(k) with the same settings to be consistent between likelihoods, you don't need hubble_units, or k_hunit in the input as both will be taken to be false. You can of course manually adjust P(k) returned if you really need it in different units. But usually it's easier not to confuse things by using h^{-1} in the units anywhere.

Post Reply