Page 1 of 1

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

Posted: March 10 2021
by Alex Krolewski
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?

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

Posted: March 12 2021
by Antony Lewis
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.