joshspeagle / dynesty

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

Problems with the tilte of traceplot, cornerplot. #212

Closed gapplef closed 3 years ago

gapplef commented 4 years ago

By default, dynesty will show 2-sigma credible interval in traceplot/cornerplot with dash lines, and it can be modified with parameter quantiles. If show_titles is true, the detail value will be shown in the title. But the value shown in the title seems fixed to 2-sigma credible interval as shown in the following code, which means it would inconsistent with the interval lines shown in the figure if the user using a self-defined quantiles value, like 1-sigma.

traceplot https://github.com/joshspeagle/dynesty/blob/7a2630f5b797cb05ed827689c037009733612fef/dynesty/plotting.py#L692-L695

cornerplot https://github.com/joshspeagle/dynesty/blob/7a2630f5b797cb05ed827689c037009733612fef/dynesty/plotting.py#L1256-L1259

joshspeagle commented 3 years ago

Ooo, good catch. I should modify that so it defaults to 2-sigma, but if the user passes their own 3 quantiles it will use those instead. And there can be a separate argument to overwrite the defaults. Thanks for bringing this to my attention.

MJKirk commented 3 years ago

@joshspeagle - I made a change that does everything needed to fix this issue. If you want I can make a pull request - the doc strings probably need improvement but otherwise I tried to do it nicely.

joshspeagle commented 3 years ago

PR would be super!!! Totally fine if the docstring isn't perfect. Thank you so much!