Page 1 of 1

Cobaya: Simple Likelihood with theory

Posted: May 02 2023
by Kunhao Zhong
Hi,

Is there now a simple way of adding a prior with cobaya.likelihood? I know in the old version we can use _theory, with something like this:

Code: Select all

like_BBN: 'lambda _theory={''H0'': None,''omegab'': None,}: np.log(0.005 <= _theory.get_param(''omegab'')((_theory.get_param(''H0'')/100)*2)
  #   <= 0.04)'
which has been deprecated. Is there something similar we can use now?

Thanks!
Kunhao

Re: Cobaya: Simple Likelihood with theory

Posted: May 05 2023
by Antony Lewis
You can add a prior to the priors block, explicitly listing arguments, e.g. see prior: block in

https://cobaya.readthedocs.io/en/latest/example_advanced.html#example-advanced-shell

If you need to use derived parameters in your prior, list them as derived parameters in the params block.

Re: Cobaya: Simple Likelihood with theory

Posted: May 11 2023
by Kunhao Zhong
Great. Thanks a lot!

kunhao