How to ask CAMB to not calculate the Cls but only the background?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Sunny Vagnozzi
Posts: 55
Joined: August 15 2016
Affiliation: Kavli Institute for Cosmology (KICC), University of Cambridge

How to ask CAMB to not calculate the Cls but only the background?

Post by Sunny Vagnozzi » September 08 2020

Hi Antony and all,

I was wondering whether there is the possibility of switching off the calculation of the Cls in CAMB and only have it calculate the background expansion, and if so how to do this.

To give some more background (no pun intended!): I am running a likelihood which only cares about background quantities (much like BAO and Pantheon). Overall the likelihood seems to run fine and relatively quickly, however I keep getting some error messages such as:

Code: Select all

  WARNING: mismatch in integrated times (CAMB: CalcScalarSources) 

Code: Select all

 'Calculator_CAMB: negative C_l (could edit to silent error here)' 
which suggest that even though the likelihood is only asking for background quantities, CAMB is still being asked to compute the Cls.

If this is the case, this seems to be quite inconvenient because 1) occasionally these errors (especially the negative Cls) make the chains die and especially 2) the likelihood could run much more quickly if CAMB did not have to compute the Cls at each step of the MCMC. Therefore, is there any way I can switch off the computation of the Cls in CAMB?

I have a related question. What is the "mismatch in integrated times" error indicating, and how can it be solved (or is it mostly harmless)? The negative Cl bit probably comes from the fact that when only using this background likelihood, rather extreme values of the model parameters are explored (I have no such problem when combining this likelihood with the Planck likelihood).

Thanks in advance for your help!


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

Re: How to ask CAMB to not calculate the Cls but only the background?

Post by Antony Lewis » September 08 2020

The get_background function will only compute the background

The mismatch warning probably means either extreme or very non-LCDM parameter values, and can be tweaked by changing accuracy parameters for the background evolution (the error arises because it computes the background separately first, this then checks the calculated time against the result when evolving the perturbation equations).

Post Reply