How to add a new parameter in CosmoMC and get its bestfit

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Yutong Wang
Posts: 9
Joined: May 06 2014
Affiliation: UCAS

How to add a new parameter in CosmoMC and get its bestfit

Post by Yutong Wang » November 07 2014

Hi everyone
i am a fresher of CosmoMC, and i want to add a new parameter in CAMB, then find the best-fit of this new parameter by CosmoMC. But i met some troubles about this process.

In the "power_tilt.f90" of CAMB, i defined a parameter such as "hk" and make "k1=k*P%hk(ix)", at the same time i revised some places which are necessary.(some places in "power_tilt.f90" and "params.ini" in CAMB)

In CAMB codepage, this revise is correct and i got the data what i want. But when i want get the best-fit of "hk" by CosmoMC, it show this warning message

Code: Select all

 Number of MPI processes:           1
 file_root:test
 NOTE: use_CMB now set internally from likelihoods
 Random seeds: 30989, 22737 rand_inst:   1
 Using clik with likelihood file ./data/clik/CAMspec_v6.2TN_2013_02_26_dist.clik
----
clik version 5887
  CAMspec e61cec87-3a37-43ca-8ed1-edcfcaf5c00a
Checking likelihood './data/clik/CAMspec_v6.2TN_2013_02_26_dist.clik' on test data. got -3908.71 expected -3908.71 (diff -3.67322e-08)
----
   TT from l=0 to l=        2500
 Clik will run with the following nuisance parameters:
 A_ps_100
 A_ps_143
 A_ps_217
 A_cib_143
 A_cib_217
 A_sz
 r_ps
 r_cib
 n_Dl_cib
 cal_100
 cal_217
 xi_sz_cib
 A_ksz
 Bm_1_1
 Using clik with likelihood file ./data/clik/lowlike_v222.clik
 Initializing Planck low-likelihood, version v2.1
----
clik version 5887
  lowlike "lowlike v222"
Checking likelihood './data/clik/lowlike_v222.clik' on test data. got -1007.04 expected -1007.04 (diff -1.87824e-07)
----
   TT from l=0 to l=          32
   EE from l=0 to l=          32
   BB from l=0 to l=          32
   TE from l=0 to l=          32
 Using clik with likelihood file ./data/clik/commander_v4.1_lm49.clik
----
clik version 5887
  gibbs d462e865-e178-449a-ac29-5c16ab9b38f5
Checking likelihood './data/clik/commander_v4.1_lm49.clik' on test data. got 3.2784 expected 3.2784 (diff -2.55576e-10)
----
   TT from l=0 to l=          49
 reading BAO data set: DR11CMASS
 reading BAO data set: DR11LOWZ
 Doing non-linear Pk: F
 Doing CMB lensing: T
 Doing non-linear lensing: F
 TT lmax =  2500
 EE lmax =  2000
 ET lmax =  2000
 BB lmax =  2000
 lmax_computed_cl  =  2500
 Computing tensors: F
 max_eta_k         =    6625.000    
 transfer kmax     =   0.8000000    
 adding parameters for: lowlike_v222
 adding parameters for: DR11CMASS
 adding parameters for: DR11LOWZ
 adding parameters for: commander_v4
 adding parameters for: CAMspec_v6
 Fast divided into            1  blocks
 20 parameters ( 6 slow ( 2 semi-slow), 14 fast ( 0 semi-fast))
 finding best fit point...
 minmizing fast parameters
 minimizing           14  with rhobeg, rhoend =    3.000000      5.0000001E-02
 minimization points:           29 chi2 converge tol:  5.0000001E-02
 Initialising BBN Helium data...
 Done. Interpolation table is           48  by           13
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?
 WARNING: NaN CL?

i guess maybe i didn't revise some necessary parts in other files of CosmoMC.(i have revised the "power_tilt.f90"、“params.ini” in CAMB and "CosmologyParameterizations.f90"、"CosmologyTypes.f90"、"Calculator_CAMB.f90"and "params_CMB.paranames" in CosmoMC.) but i didn't find the key to this problem until now.

Somebody can help me to solve this problem or give me some advises about it?

Thanks a lot~

PS: By the way ,the version of CosmoMC which i used is July 2014.

Post Reply