aboutsummaryrefslogtreecommitdiff
path: root/utils/chi2
diff options
context:
space:
mode:
Diffstat (limited to 'utils/chi2')
-rwxr-xr-xutils/chi224
1 files changed, 23 insertions, 1 deletions
diff --git a/utils/chi2 b/utils/chi2
index 5ef97f5..960d87c 100755
--- a/utils/chi2
+++ b/utils/chi2
@@ -362,7 +362,7 @@ def do_fit(data,muon,data_mc,bins,steps):
pos = np.empty((20, len(x0)),dtype=np.double)
for i in range(pos.shape[0]):
- pos[i] = xopt + np.random.randn(len(x0))*0.1
+ pos[i] = xopt + np.random.randn(len(x0))*xopt*0.1
pos[i,:] = np.clip(pos[i,:],low,high)
nwalkers, ndim = pos.shape
@@ -597,29 +597,51 @@ if __name__ == '__main__':
plt.subplot(3,3,1)
plt.hist(samples[:,0],bins=100,histtype='step')
plt.xlabel("Atmospheric Flux Scale")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,2)
plt.hist(samples[:,1],bins=100,histtype='step')
plt.xlabel("Electron Energy Scale")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,3)
plt.hist(samples[:,2],bins=100,histtype='step')
plt.xlabel("Electron Energy Resolution")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,4)
plt.hist(samples[:,3],bins=100,histtype='step')
plt.xlabel("Muon Energy Scale")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,5)
plt.hist(samples[:,4],bins=100,histtype='step')
plt.xlabel("Muon Energy Resolution")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,6)
plt.hist(samples[:,5],bins=100,histtype='step')
plt.xlabel("Electron + Muon Energy Scale")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,7)
plt.hist(samples[:,6],bins=100,histtype='step')
plt.xlabel("Electron + Muon Energy Resolution")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.subplot(3,3,8)
plt.hist(samples[:,7],bins=100,histtype='step')
plt.xlabel("Muon Scale")
+ despine(ax=plt.gca(),left=True,trim=True)
+ plt.gca().get_yaxis().set_visible(False)
plt.tight_layout()
+ if args.save:
+ plt.savefig("chi2_fit_posterior.pdf")
+ plt.savefig("chi2_fit_posterior.eps")
+ else:
+ plt.suptitle("Fit Posteriors")
+
handles = [Line2D([0], [0], color='C0'),
Line2D([0], [0], color='C1'),
Line2D([0], [0], color='C2')]