CosmoMC/Power_Name parameter

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC/Power_Name parameter

Post by Hiranya Peiris » September 09 2005

Hi,

Is there an easy way to set the "power_name" parameter that is usually in the CAMB input file to specify the initial power spectrum in the CosmoMC input file instead? If not, which files do I need to modify? Apologies if this is obvious.

Thanks,
Hiranya

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

Re: CosmoMC/Power_Name parameter

Post by Antony Lewis » September 09 2005

Unfortunately you can't dynamically change the initial power spectrum module if that's what you mean (blame F90 for only having static objects!). CAMB doesn't let you do that either - you need to recompile with the different module, or make a new big module that includes all the options you need for different parameterizations (adding option flags as appropriate to the relevant .ini files).

Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC/Power_Name parameter

Post by Hiranya Peiris » September 09 2005

Hi Antony,

No, I mean something far simpler :) I have many different initial power spectrum modules defined as options in power_tilt.f90 and I just want to tell CosmoMC to use a given one of them (i.e. it remains constant throughout a MCMC run) in its params.ini file without the hassle of having to set this variable in power_tilt.f90 and reccompile, which is what I have to do now. i.e. I want to set the power_name parameter from CAMB's ini file, but in CosmoMC's .ini file.

Also, is there a way to get CAMB to print out its CMB power spectra to a file when called from CosmoMC? It doesn't seem to be doing that at the moment and I don't see an obvious CosmoMC option for it.

Sorry to bother you and thanks so much for the quick reply.

Cheers
Hiranya

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

Re: CosmoMC/Power_Name parameter

Post by Antony Lewis » September 09 2005

If you've modified the InitialPower module so that power_name is no longer a fixed parameter, you can probably set it from CosmoMC just by adding an extra line in CosmoMC's driver.f90 file to read in a new parameter giving the power_name (add the module to the program's use list).

CosmoMC will produce .data files which contain the power spectrum data in binary format, but at the moment there's no easy way to get a plot of a CMB power spectrum from cosmomc. You could edit e.g. cmbdata.f90 to write it out if you wanted to.

Hiranya Peiris
Posts: 54
Joined: September 28 2004
Affiliation: University College London

CosmoMC/Power_Name parameter

Post by Hiranya Peiris » September 09 2005

Hi Antony,

That worked fine, thanks a lot. The support you provide here is very much appreciated.

Cheers
Hiranya

Post Reply