diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-11-14 13:37:59 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-11-14 13:37:59 -0600 |
commit | 488e0caec255a9180d38cd16d40432c0d0b3c966 (patch) | |
tree | 08625d2589c905daea12d39f89603472be350f6a /utils | |
parent | cc6ed467bf75616db93b724171844b547f69160d (diff) | |
download | sddm-488e0caec255a9180d38cd16d40432c0d0b3c966.tar.gz sddm-488e0caec255a9180d38cd16d40432c0d0b3c966.tar.bz2 sddm-488e0caec255a9180d38cd16d40432c0d0b3c966.zip |
update plot.py
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/plot.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/plot.py b/utils/plot.py index 1f2019b..b74e14a 100755 --- a/utils/plot.py +++ b/utils/plot.py @@ -93,9 +93,10 @@ if __name__ == '__main__': dir = [np.sin(theta)*np.cos(phi),np.sin(theta)*np.sin(phi),np.cos(theta)] dir = np.array(dir)/np.linalg.norm(dir) thetas.append(np.degrees(np.arccos(np.dot(true_dir,dir)))) - fmin_electron = event['ev'][0]['fit'][IDP_E_MINUS]['fmin'] - fmin_muon = event['ev'][0]['fit'][IDP_MU_MINUS]['fmin'] - likelihood_ratio.append(fmin_muon-fmin_electron) + if IDP_E_MINUS in event['ev'][0]['fit'] and IDP_MU_MINUS in event['ev'][0]['fit']: + fmin_electron = event['ev'][0]['fit'][IDP_E_MINUS]['fmin'] + fmin_muon = event['ev'][0]['fit'][IDP_MU_MINUS]['fmin'] + likelihood_ratio.append(fmin_muon-fmin_electron) mean, mean_error, std, std_error = get_stats(dT) print("dT = %.2g +/- %.2g" % (mean, mean_error)) |