aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-11-03 10:44:47 -0600
committertlatorre <tlatorre@uchicago.edu>2020-11-03 10:44:47 -0600
commitbd8fcac35b81af205c34b2811a4f90cf152dc0d0 (patch)
treefa2e2947c53b80fd6643019781b21f078e9994be
parent3958f04ff6202f0f9f137285fbebdef399b8851d (diff)
downloadsddm-bd8fcac35b81af205c34b2811a4f90cf152dc0d0.tar.gz
sddm-bd8fcac35b81af205c34b2811a4f90cf152dc0d0.tar.bz2
sddm-bd8fcac35b81af205c34b2811a4f90cf152dc0d0.zip
fix bug in get_events()
This commit fixes an unnecessary call to set the index on the ev dataframe. This was causing issues when trying to process run 11903 since it didn't have any fits to merge into the ev dataframe.
-rw-r--r--utils/sddm/plot_energy.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py
index 0516729..bba0e75 100644
--- a/utils/sddm/plot_energy.py
+++ b/utils/sddm/plot_energy.py
@@ -618,7 +618,6 @@ def get_events(filenames, merge_fits=False, nhit_thresh=None, apply_nhit_trigger
ev[column] = ev[column].fillna(0)
ev[column] = ev[column].astype(np.int32)
# Set the index to (run, gtid) so we can set columns from the single particle results
- ev = ev.set_index(['run','gtid'])
ev_single_particle = ev[(ev.id2 == 0) & (ev.id3 == 0)]
ev_single_particle = ev_single_particle.sort_values('fmin').groupby(['run','gtid']).nth(0)
ev = ev.sort_values('fmin').groupby(['run','gtid']).nth(0)