CosmoMC: How to re-interpret the unused standard parameters?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Jie Ren
Posts: 28
Joined: May 13 2006
Affiliation: Theoretical Physics Division, Chern Institute of Mathematics, Nankai University, Tianjin, China

CosmoMC: How to re-interpret the unused standard parameters?

Post by Jie Ren » September 14 2006

Hello, I am a beginner of CosmoMC and have a question as follows. Thanks a lot for any helps.

According to CosmoMC Readme,
***************************************************
FAQ 3 I'm writing a paper "constraints on X". How do I add X to cosmomc?

Often the easiest thing to do is to re-interpret one of the unused standard parameters, e.g. w, A_T, etc, depending on whether the parameter is "fast" or not (if in doubt, use one of the slow parameters like w or f_nu). You just need to change the CMBToCAMB routine in CMB_Cls_Simple.f90 so that your parameter is correctly fed into CAMB, change limits appropriately in the params.ini file, etc.
****************************************************

I am confused that the parameters in "CMB_Cls_Simple.f90" and "params.ini" are not one-to-one correspondent. For example, there is no parameter "H0" in "params.ini". If I want to re-interpret the "n_t" as a new parameter "xx", how should I modify the file "CMB_Cls_Simple.f90"? Is it "P%xx = CMB%n_t" or "P%xx = CMB%param9"?

In the file "cosmomc/source/CMB_Cls_Simple.f90",
************************************
subroutine CMBToCAMB(CMB,P)
use LambdaGeneral
type(CMBParams) CMB
type(CAMBParams) P
P = CAMBP
P%omegab = CMB%omb
P%omegan = CMB%omnu
P%omegac = CMB%omc
P%omegav = CMB%omv
P%H0 = CMB%H0
P%Reion%redshift= CMB%zre
if (w_is_w) then
w_lam = CMB%w
else
P%InitialConditionVector(initial_iso_baryon) = CMB%w
w_lam = -1
end if
end subroutine CMBToCAMB
*************************************

In the file "cosmomc/params.ini",
*****************************************************
#parameter start center, min, max, start width, st. dev. estimate
#ombh2
param1 = 0.0223 0.005 0.1 0.001 0.001
#omdmh2
param2 = 0.105 0.01 0.99 0.01 0.01
#theta
param3 = 1.04 0.5 10 0.002 0.002
#tau
param4 = 0.09 0.01 0.8 0.03 0.03

#omk
param5 = 0 0 0 0 0
#nufrac
param6 = 0 0 0 0 0
#w
#param7 = -1 -1 -1 0 0

#n_s
param8 = 0.95 0.5 1.5 0.03 0.01
#n_t
param9 = 0 0 0 0 0
#n_run
param10 = 0 0 0 0 0
******************************************************

Jie Ren
Posts: 28
Joined: May 13 2006
Affiliation: Theoretical Physics Division, Chern Institute of Mathematics, Nankai University, Tianjin, China

CosmoMC: How to re-interpret the unused standard parameters?

Post by Jie Ren » September 21 2006

It seems that several files should be modified. I tried to modify some files to add a parameter (re-interpret a standard parameter) but did not use this parameter. When I run cosmomc, the following error occurred:

[root@localhost cosmomc]# ./cosmomc params.ini
Random seeds: 23116, 19033 rand_inst: 0
WARNING: computing tensors with num_cls=3 (BB=0)
Computing tensors: F
Doing CMB lensing: F
lmax = 2100
Number of C_ls = 3
Varying 6 parameters ( 0 fast)
reading: params_CMB.covmat
Finding max-like point
Warning: Rombint failed to converge;
integral, error, tol: 16531.7327716879 -8.059793530021953E-004
1.000000000000000E-007
Warning: Rombint failed to converge;
integral, error, tol: 13949.4504709402 -9.551799369411640E-004
1.000000000000000E-007
ERROR: Trial parameters excluded by prior or error in likelihood
Try starting further away from problem regions?

This error very often occurs when I run cosmomc:

ERROR: Trial parameters excluded by prior or error in likelihood
Try starting further away from problem regions?

Why this error? Thanks a lot for any helps!

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

Re: CosmoMC: How to re-interpret the unused standard paramet

Post by Antony Lewis » September 21 2006

Jie Ren wrote: I am confused that the parameters in "CMB_Cls_Simple.f90" and "params.ini" are not one-to-one correspondent. For example, there is no parameter "H0" in "params.ini". If I want to re-interpret the "n_t" as a new parameter "xx", how should I modify the file "CMB_Cls_Simple.f90"? Is it "P%xx = CMB%n_t" or "P%xx = CMB%param9"?
"%xx = CMB%n_t" - since n_t is what you are now pretending is something else.

CMB is the internal object containing physical parameters. The params array is mapped into this in the params_xxx.f90 file - this allows change of parameterization. CMB is mapped to the CAMB types in CMB_Cls_Simple.f90 - this allows other CMB codes to replace CMB_Cls_Simple.

Regarding the other question, I think this is the same as
http://cosmocoffee.info/viewtopic.php?t=664

Post Reply