adding derived parameters to cosmomc

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Jaiseung Kim
Posts: 13
Joined: January 21 2008
Affiliation: Max Planck Institute for Astrophysics

adding derived parameters to cosmomc

Post by Jaiseung Kim » May 17 2013

How do I add new derived parameters to the recent version of cosmomc (March 2013)?
thank you!

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

Re: adding derived parameters to cosmomc

Post by Antony Lewis » May 17 2013

Use SetDerived in CMB_Cls_simple.f90, or change the corresponding default derived parameters array in CAMB.

Akhilesh Nautiyal(akhi)
Posts: 72
Joined: June 13 2007
Affiliation: Malaviya National Institute of Technology Jaipur

adding derived parameters to cosmomc

Post by Akhilesh Nautiyal(akhi) » July 17 2013

Hi,

I am modifying cosmomc to use Modecode and I have added derived parameters in SetDerived. Everything is working fine but in the first Row of file_root.txt file in Chains I am not getting the correct values for these parameters. From the second row onwards it is working fine. Can I initialize the derived parameters some where to fix this issue??? The code is as follow.

In subroutine SetDerived I have modified as
Theory%numderived = nthermo_derived + noutputs*3+6

and
Theory%derived_parameters(nthermo_derived+noutputs*3+1)=Theory%modpk_Npivot
Theory%derived_parameters(nthermo_derived+noutputs*3+2)=Theory%modpk_ns
Theory%derived_parameters(nthermo_derived+noutputs*3+3)=Theory%modpk_nt
Theory%derived_parameters(nthermo_derived+noutputs*3+4)=Theory%modpk_nrun
Theory%derived_parameters(nthermo_derived+noutputs*3+5)=log(1.d10*Theory%modpk_As)
Theory%derived_parameters(nthermo_derived+noutputs*3+6)=Theory%modpk_r

And in subtoutine SetPowersFromCAMB I have used

Theory%modpk_Npivot = N_pivot
Theory%modpk_ns = modpk_ns
Theory%modpk_nt = modpk_nt
Theory%modpk_nrun = modpk_nrun
Theory%modpk_As = modpk_As
Theory%modpk_r = modpk_r

Thanks,
Akhilesh

Post Reply