From a7cfee22569ef2afb8d2b89b47ec6ee74c5f8037 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 30 Aug 2020 09:17:01 -0500 Subject: update energy resolution -> max(EPSILON,resolution) This commit updates the chi2 script to make sure that the energy resolution is nonzero otherwise we get nans. --- utils/chi2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/chi2 b/utils/chi2 index 0a8fc00..b393954 100755 --- a/utils/chi2 +++ b/utils/chi2 @@ -120,13 +120,13 @@ def get_mc_hists_fast(ke_dict,x,bins,apply_norm=False): if id in (20,2020): ke = ke*x[1] - scale = bincenters2*x[2] + scale = bincenters2*max(EPSILON,x[2]) elif id in (22,2222): ke = ke*x[3] - scale = bincenters2*x[4] + scale = bincenters2*max(EPSILON,x[4]) elif id == 2022: ke = ke*x[5] - scale = bincenters2*x[6] + scale = bincenters2*max(EPSILON,x[6]) hist = np.histogram(ke,bins=bins2)[0] -- cgit