From c713bca9ea51cec82471bb04cf0eec87f9e36912 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Tue, 16 Jun 2020 01:56:22 -0500 Subject: update follower cuts to be more memory efficient by using ffill() --- utils/plot-energy | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'utils/plot-energy') diff --git a/utils/plot-energy b/utils/plot-energy index ede0613..4568bcc 100755 --- a/utils/plot-energy +++ b/utils/plot-energy @@ -136,16 +136,10 @@ if __name__ == '__main__': # 2. Nhit >= 100 # 3. It must be > 800 ns and less than 20 microseconds from a prompt event # or a muon - michel = ev.groupby('run',group_keys=False).apply(michel_cut) + michel = ev[ev.michel] print("number of michel events = %i" % len(michel)) - # Tag atmospheric events. - # - # Note: We don't cut atmospheric events or muons yet because we still need - # all the events in order to apply the muon follower cut. - ev = ev.groupby('run',group_keys=False).apply(atmospheric_events) - print("number of events after neutron follower cut = %i" % np.count_nonzero(ev.prompt & (~ev.atm))) # remove events 200 microseconds after a muon -- cgit