diff options
Diffstat (limited to 'utils/sddm/plot_energy.py')
-rwxr-xr-x | utils/sddm/plot_energy.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py index cf59bc6..192b8b9 100755 --- a/utils/sddm/plot_energy.py +++ b/utils/sddm/plot_energy.py @@ -570,8 +570,12 @@ def get_events(filenames, merge_fits=False, nhit_thresh=None): # Require at least 1 NHIT trigger to fire ev = ev[(ev.trg_type & (TRIG_NHIT_100_LO | TRIG_NHIT_100_MED | TRIG_NHIT_100_HI | TRIG_NHIT_20 | TRIG_NHIT_20_LB)) != 0] + # Require all 10 fits + fits = fits.groupby(['run','gtid']).filter(lambda x: len(x) >= 10).reset_index() + if merge_fits: ev = pd.merge(ev,fits,how='left',on=['run','gtid']) + # Reset n, id1, id2, and id3 columns to integers for column in ['n','id','id1','id2','id3']: ev[column] = ev[column].fillna(0) |