From bd8fcac35b81af205c34b2811a4f90cf152dc0d0 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Tue, 3 Nov 2020 10:44:47 -0600 Subject: 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. --- utils/sddm/plot_energy.py | 1 - 1 file changed, 1 deletion(-) 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) -- cgit