diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-08-30 09:17:01 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-08-30 09:17:01 -0500 |
commit | a7cfee22569ef2afb8d2b89b47ec6ee74c5f8037 (patch) | |
tree | 9952d8149ec15d7016aebdac8aa4dbaa2909d56a /utils/chi2 | |
parent | 5d8a61777f8d7a65402c3bbd776041c9466d33c9 (diff) | |
download | sddm-a7cfee22569ef2afb8d2b89b47ec6ee74c5f8037.tar.gz sddm-a7cfee22569ef2afb8d2b89b47ec6ee74c5f8037.tar.bz2 sddm-a7cfee22569ef2afb8d2b89b47ec6ee74c5f8037.zip |
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.
Diffstat (limited to 'utils/chi2')
-rwxr-xr-x | utils/chi2 | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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] |