[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood calculator

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Luke Hart
Posts: 39
Joined: July 13 2015
Affiliation: University of Manchester

[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood

Post by Luke Hart » January 18 2018

Dear Antony,

I'm currently thinking of using CosmoMC for the calculation of the likelihood for a given set of parameter lists, where I can set the parameter values that CosmoMC samples from.

Am I right in thinking this should be done in the GenericLikelihoodFunction part of the code because I'd assume that's reserved for calculating the likelihood in a different way, rather than just attaining a given likelihood for a given set of parameters.

Once again, apologies if this is obvious, my Fortran is a bit shaky so any help will be appreciated!

Luke

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

Re: [CosmoMC Nov 2016] Selective sampling off CosmoMC likeli

Post by Antony Lewis » January 19 2018

If you are using a custom function, rather than cosmology codes + likelihoods using them, you can use GenericLikelihoodFunction to use CosmoMC as a generic sampler.

Luke Hart
Posts: 39
Joined: July 13 2015
Affiliation: University of Manchester

[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood

Post by Luke Hart » January 19 2018

Sorry Antony I don’t think I was clear in what I needed.

I want specific samples from CosmoMC using the same infrastructure. Using the same datasets in the same way

Code: Select all

include(BAO.ini)
However, the sampling on the grid I want is just a set amount of samples around the fiducial model. Essentially just the best fit parameters and then each parameter plus or minus a small change, as necessary for the Fisher analysis.

I also need to vary one integer parameter that indexes certain changes to my code. So I believe it’s a little more complicated than just using estimate_propose_matrix.

Thanks
Luke

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

Re: [CosmoMC Nov 2016] Selective sampling off CosmoMC likeli

Post by Antony Lewis » January 20 2018

I guess you'd need to write your own code to call the likelihood functions. e.g. you can see how the minimize.f90 file does it for minimization.

Luke Hart
Posts: 39
Joined: July 13 2015
Affiliation: University of Manchester

[CosmoMC Nov 2016] Selective sampling off CosmoMC likelihood

Post by Luke Hart » February 07 2018

Dear Antony,

Thank you for your suggestions, I'm currently rooting around in CosmoMC now. The complication I'm finding is that I'm trying to make sure that nuisance parameters are marginalised over as well, so I'm struggling to see where I can pass these new samples over and how. The BOBYQA routines are giving me hints but I'm confused as to how they actually get a set list of samples.

Thanks

Luke

Post Reply