Page 1 of 1

[CosmoMC 2017] Sampler ideas

Posted: January 31 2019
by Luke Hart
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!!

Re: [CosmoMC 2017] Sampler ideas

Posted: February 01 2019
by Antony Lewis
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.

Re: [CosmoMC 2017] Sampler ideas

Posted: February 01 2019
by Luke Hart
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

Re: [CosmoMC 2017] Sampler ideas

Posted: February 01 2019
by Luke Hart
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