[CosmoMC 2017] Sampler ideas

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

[CosmoMC 2017] Sampler ideas

Post by Luke Hart » January 31 2019

Dear all,

I'm in a spot of bother with the Planck code and I've noticed that my code really isn't very efficient the way I'm using it. What I ideally need is the following:
  • A way of running CosmoMC samples with a list of given parameter values coming from file. Effectively a set of chains but where I have the control on what values the parameters are taking as the likelihood code is evaluated.
Any ideas?

Luke

P.S. I have tried thinking about using the GenericLikelihoodFunction option but I'm struggling to see how you would loop over values of the Params and also call the standard likelihood methods I would need in place anyway?

Thanks in advance!!

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

Re: [CosmoMC 2017] Sampler ideas

Post by Antony Lewis » February 01 2019

You could make a .txt "chain" file with parameters, then importance sample it. Of course you'd also need to supply values of all the Planck likelihood nuisance parameters.

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

Re: [CosmoMC 2017] Sampler ideas

Post by Luke Hart » February 01 2019

Does that include all the leakage parameters as well and all the ones that are typically kept at 0? Sorry, I've heard about the importantance sampling features I just haven't used them yet?

Thanks
Luke

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

Re: [CosmoMC 2017] Sampler ideas

Post by Luke Hart » February 01 2019

Also @Antony, would the original MCMC run have to have sampled all the points that you were pointing to in your importance sample?

For example, if I had a parameter named x, that had a very clear effect on the CMB power spectrum that I set x = 1, but then I wanted to find the likelihood for x=2, would the importance sampling require that value to have been already computed? Or can it calculate it from the model difference (redo theory on) and the likelihood data?

Thanks in advance
Luke

Post Reply