CosmoMC : non-uniform prior

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Stéphane Ilic
Posts: 17
Joined: February 11 2014
Affiliation: IRAP Toulouse

CosmoMC : non-uniform prior

Post by Stéphane Ilic » May 08 2014

Hello all,

I would like to use a non-uniform prior for one existing cosmological parameter in cosmomc, namely "ns". Let's say that I would like a uniform prior for "ns^2" : what would be the best way to proceed?

Thanks a lot in advance.

Best regards.

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

Re: CosmoMC : non-uniform prior

Post by Antony Lewis » May 08 2014

Probably easiest to add it as a "non-base prior" in the function TP_NonBaseParameterPriors of CosmologyParameterizations.f90, like the Hubble parameter one.

Alternative you could modify the parameterization so that the MCMC parameter is ns^2 rather than ns.

Stéphane Ilic
Posts: 17
Joined: February 11 2014
Affiliation: IRAP Toulouse

CosmoMC : non-uniform prior

Post by Stéphane Ilic » May 08 2014

Thanks for your answer Antony ; for the second solution that you propose, do I also have to modify something in CosmologyParameterizations.f90 ? I understand that ns corresponds to the first element of the InitPower array, right ? Should I modify it in the SetFast routine maybe?

Thanks again!

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

Re: CosmoMC : non-uniform prior

Post by Antony Lewis » May 08 2014

Yes, and probably use a new .paramnames file with a name for your new parameter (and maybe add a new derived parameter with the now-derived ns if you want).

Stéphane Ilic
Posts: 17
Joined: February 11 2014
Affiliation: IRAP Toulouse

CosmoMC : non-uniform prior

Post by Stéphane Ilic » May 08 2014

Thanks again Antony !

A small correction to my previous message though : "ns" is the second element of the InitPower array.

Post Reply