Skip to content
Snippets Groups Projects
Commit 98dbe528 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Remves the burn-in period from the distribution plot

parent 620b8f5a
No related branches found
No related tags found
No related merge requests found
...@@ -973,7 +973,7 @@ class MCMCSearch(BaseSearchClass): ...@@ -973,7 +973,7 @@ class MCMCSearch(BaseSearchClass):
raise ValueError("dist_type {} unknown".format(dist_type)) raise ValueError("dist_type {} unknown".format(dist_type))
def plot_walkers(self, sampler, symbols=None, alpha=0.4, color="k", temp=0, def plot_walkers(self, sampler, symbols=None, alpha=0.4, color="k", temp=0,
lw=0.1, burnin_idx=None): lw=0.1, burnin_idx=None, add_det_stat_burnin=False):
""" Plot all the chains from a sampler """ """ Plot all the chains from a sampler """
shape = sampler.chain.shape shape = sampler.chain.shape
...@@ -1014,7 +1014,7 @@ class MCMCSearch(BaseSearchClass): ...@@ -1014,7 +1014,7 @@ class MCMCSearch(BaseSearchClass):
axes.append(fig.add_subplot(ndim+1, 1, ndim+1)) axes.append(fig.add_subplot(ndim+1, 1, ndim+1))
lnl = sampler.lnlikelihood[temp, :, :] lnl = sampler.lnlikelihood[temp, :, :]
if burnin_idx: if burnin_idx and add_det_stat_burnin:
axes[-1].hist(lnl[:, :burnin_idx].flatten(), bins=50, axes[-1].hist(lnl[:, :burnin_idx].flatten(), bins=50,
histtype='step', color='r') histtype='step', color='r')
axes[-1].hist(lnl[:, burnin_idx:].flatten(), bins=50, histtype='step', axes[-1].hist(lnl[:, burnin_idx:].flatten(), bins=50, histtype='step',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment