View previous topic :: View next topic 
Author 
Message 
Albin Nilsson
Joined: 05 Oct 2016 Posts: 13 Affiliation: NCBJ, Warsaw

Posted: October 17 2016 


I'm sorry if this is a trivial question, but I am just getting started with cosmomc and I am a little confused.
I have a cosmological model which basically introduces two new parameters into the Friedmann equation, call them param1 and param2. These parameters are not independent, but depend on each other in some way. I would like to constrain these parameters using Planck data.
I assume that I need to calculate and predict some parameter values which I can then constrain using cosmomc. Could anyone tell me how to go about doing this? I know that there are a few threads about adding new parameters, but I have not been able to gather how to go about coding my specific case.
Thanks in advance 

Back to top 


Antony Lewis
Joined: 23 Sep 2004 Posts: 1224 Affiliation: University of Sussex

Posted: October 17 2016 


If param1 is a function of param2, then just add the one parameter param1, and calculate param2 in your theory/likelihood calculation. 

Back to top 


Albin Nilsson
Joined: 05 Oct 2016 Posts: 13 Affiliation: NCBJ, Warsaw

Posted: October 17 2016 


By adding you mean following the procedure in: http://cosmocoffee.info/viewtopic.php?t=1149&postdays=0&postorder=asc&start=15?
My problem is really that I don't understand how cosmomc then knows what param1 is, and how the equations for cosmological evolution depend on it.
In this case, it might be easier to redefine Ω_{M}, Ω_{Λ}, Ω_{curv} and Ω_{rad}, since my new parameters attach to all of those. Where are they defined? 

Back to top 


Antony Lewis
Joined: 23 Sep 2004 Posts: 1224 Affiliation: University of Sussex

Posted: October 17 2016 


It's the "Modify Calculator_CAMB.f90" step of the readme FAQ where you interface the cosmomc variable with CAMB which determines what it actually means. 

Back to top 


Albin Nilsson
Joined: 05 Oct 2016 Posts: 13 Affiliation: NCBJ, Warsaw

Posted: October 18 2016 


Thanks for the help so far. This is what I have done:
1. Added line 115 in CosmologyTypes.f90, added 2 new parameters, param1 and param2
2. Changed the number of hard parameters on line 71 in CosmologyParameterization
s.f90 from 16 to 18.
3. Changed line 64 to call myparams.paramnames instead of params_CMB.paramnames
4. Created myparams.paramnames and added param1 and param2 at the end
5. Added lines 85 and 86 in Calculator_CAMB.f90 (real(dl) param1, and real(dl) param2)
The last step is then to modify the code to account for the structure changed by these new parameters; this is where I am stumped (partly because I don't speak Fortran).
My parameters attach to Ω_{m}, Ω_{Λ}, Ω_{rad} and Ω_{curv} in different ways.
If my new Ω_{m} is (for example) Ω = Ω_{m} * param1, can I express that like this in Calculator_CAMB:
Code:  P%omegab = CMB%omb * param1 
and
Code:  P%omegac = CMB%omc * param1 
also, where do the other ΛCDMparameters (curv and rad) come in?. I assume Ω_{m} = Ω_{c} + Ω_{b}
Thanks again for answering my questions 

Back to top 


