aboutsummaryrefslogtreecommitdiff
path: root/utils/chi2
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-07-06 11:20:00 -0500
committertlatorre <tlatorre@uchicago.edu>2020-07-06 11:20:00 -0500
commit4f63d9b3bc6d15dd8962b5de81ccfc78a63f3b75 (patch)
treece81411289ac3d2d1966ae71396933006b6defbe /utils/chi2
parente5a66e48d690a6e49c909e797097d6374ff95feb (diff)
downloadsddm-4f63d9b3bc6d15dd8962b5de81ccfc78a63f3b75.tar.gz
sddm-4f63d9b3bc6d15dd8962b5de81ccfc78a63f3b75.tar.bz2
sddm-4f63d9b3bc6d15dd8962b5de81ccfc78a63f3b75.zip
update plot-muons
- add get_multinomial_prob() function to stats.py - add plot_hist2_data_mc() function to do the normal particle id plot but also print p values - other small bug fixes
Diffstat (limited to 'utils/chi2')
-rwxr-xr-xutils/chi23
1 files changed, 0 insertions, 3 deletions
diff --git a/utils/chi2 b/utils/chi2
index 72ad89b..f1ae974 100755
--- a/utils/chi2
+++ b/utils/chi2
@@ -121,9 +121,6 @@ def make_nll(data, mc_hists):
return nll - norm.logpdf(x[1],ENERGY_SCALE_MEAN,ENERGY_SCALE_UNCERTAINTY)
return nll
-def chi2(samples,expected):
- return np.sum((samples-expected)**2/expected,axis=-1)
-
def get_mc_hist(data,x,bins):
hist = np.histogram(data,bins=bins)[0]
return sample_mc_hist(hist,norm=x[0]/100.0)