joshspeagle / dynesty

Dynamic Nested Sampling package for computing Bayesian posteriors and evidences
https://dynesty.readthedocs.io/
MIT License
346 stars 76 forks source link

How to access posteriors? #470

Closed mkplummer closed 6 months ago

mkplummer commented 7 months ago

Dynesty version 1.2.0

Your question I apologize for the simplicity of this question, but I am having trouble figuring out how to access the posterior distributions which are plotted via the dynesty corner plot module. I notice that the results.samples are not exactly the same as the true posteriors and I think this is because they are weighted. Any help would be greatly appreciated. Thank you!

segasai commented 6 months ago

Please check the demos, i.e. this one https://github.com/joshspeagle/dynesty/blob/master/demos/Demo%201%20-%20Overview.ipynb that talks about how to get the equally weighted samples. See also the docs here: https://dynesty.readthedocs.io/en/latest/quickstart.html#basic-post-processing