Closed tomasstolker closed 2 years ago
I forgot to mention that the reason that I implemented this is that nested sampling sometimes more effectively explores the prior space while the walkers with the MCMC sometimes get trapped in local minima. So for some cases it may work better as I noticed at least for one dataset that I was working on.
Hi @kammerje,
This pull request adds support for using the nested sampling algorithm of
MultiNest
. Themcmc
function takes the additional parameterssampler
(default: emcee) andn_live_points
. Multiprocessing is supported throughmpi4py
.The
chains
andcorner
plot functions receive the samples now directly as input, instead of theemcee
sampler object. Thechains
plot is skipped whensampler='multinest'
.The prior boundaries are set to an arbitrary range of 20% from the best-fit value from the
chi2map
, so that is quite arbitrary and could perhaps be changed.I have also included the sampler name, the array with samples, and the ln(z), to the dictionary that is returned by
mcmc
.Let me know if you have any feedback!