aboutsummaryrefslogtreecommitdiff
path: root/utils/plot
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-04-13 13:30:38 -0500
committertlatorre <tlatorre@uchicago.edu>2020-04-13 13:30:38 -0500
commit27020846248d820d78ac2add2cb1098ea83de65d (patch)
treeb361bd16f1bbfa0376965249979516d8a631c3c4 /utils/plot
parentba6c298b213d87153d56e12494675ce01207a440 (diff)
downloadsddm-27020846248d820d78ac2add2cb1098ea83de65d.tar.gz
sddm-27020846248d820d78ac2add2cb1098ea83de65d.tar.bz2
sddm-27020846248d820d78ac2add2cb1098ea83de65d.zip
update plot script now that we have multiple fits per particle combo
Diffstat (limited to 'utils/plot')
-rwxr-xr-xutils/plot4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/plot b/utils/plot
index fd5ea51..2c0857b 100755
--- a/utils/plot
+++ b/utils/plot
@@ -115,6 +115,10 @@ if __name__ == '__main__':
# merge data and fits on run and gtid
data = data.merge(fits,left_on=['run','gtid'],right_on=['fit_run','fit_gtid'])
+ # Select only the best fit for a given run, gtid, and particle
+ # combo
+ data = data.sort_values('fit_fmin').groupby(['run','gtid','fit_id1','fit_id2','fit_id3'],as_index=False).nth(0).reset_index(level=0,drop=True)
+
# calculate true kinetic energy
mass = [SNOMAN_MASS[id] for id in data['mcgn_id'].values]
data['T'] = data['mcgn_energy'].values - mass