Commit d4bcaa97 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fixes plotting det stat histogram

parent bb17752e
......@@ -993,18 +993,20 @@ class MCMCSearch(core.BaseSearchClass):
if burnin_idx and add_det_stat_burnin:
burn_in_vals = lnl[:, :burnin_idx].flatten()
try:
axes[-1].hist(burn_in_vals[~np.isnan(burn_in_vals)],
bins=50, histtype='step', color='C3')
twoF_burnin = (burn_in_vals[~np.isnan(burn_in_vals)]
- self.likelihoodcoef)
axes[-1].hist(twoF_burnin, bins=50, histtype='step',
color='C3')
except ValueError:
logging.info('Det. Stat. hist failed, most likely all '
'values where the same')
pass
else:
burn_in_vals = []
twoF_burnin = []
prod_vals = lnl[:, burnin_idx:].flatten()
try:
axes[-1].hist(prod_vals[~np.isnan(prod_vals)], bins=50,
histtype='step', color='k')
twoF = prod_vals[~np.isnan(prod_vals)]-self.likelihoodcoef
axes[-1].hist(twoF, bins=50, histtype='step', color='k')
except ValueError:
logging.info('Det. Stat. hist failed, most likely all '
'values where the same')
......@@ -1014,7 +1016,7 @@ class MCMCSearch(core.BaseSearchClass):
else:
axes[-1].set_xlabel(r'$\widetilde{2\mathcal{F}}$')
axes[-1].set_ylabel(r'$\textrm{Counts}$')
combined_vals = np.append(burn_in_vals, prod_vals)
combined_vals = np.append(twoF_burnin, twoF)
if len(combined_vals) > 0:
minv = np.min(combined_vals)
maxv = np.max(combined_vals)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment