joshspeagle / dynesty

Dynamic Nested Sampling package for computing Bayesian posteriors and evidences

Home Page:https://dynesty.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Importing Nested Sampling chains from file to plot

BorisDeletic opened this issue · comments

Hi,

I would like to use dyplot to do some analysis on nested sampling chains generated by an external sampler. I am looking for a way to load in the output files containing the data of the full NS run into the dyplot Results and then make some graphs. I cant find anywhere in the docs about loading data from files, so would appreciate any pointers if I have missed that, or advice how to acheive this.

Regards

Hi,

The plotting needs a dynesty.results.Results object:

You can probably fake it with something like this:

 import dynesty.results

res= dynesty.results.Results([('logl', [1, 2, 3]), ('samples_it',[1,2,3])])

But it's not suported, you will need to provide multiple attributes to make the Results object.

Thanks for the help. I think it would be a very useful feature for dynesty as the plotting and analysis tools are very neat and well developed. I may add a PR if I get this working with Polychord chains.