aboutsummaryrefslogtreecommitdiff
path: root/utils/plot-energy
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-06-16 01:56:22 -0500
committertlatorre <tlatorre@uchicago.edu>2020-06-16 01:56:22 -0500
commitc713bca9ea51cec82471bb04cf0eec87f9e36912 (patch)
treead1338eccb7a1273ba25a0e030f647662d991254 /utils/plot-energy
parent0b70890d0462b56d54f6ba76d6df142f5f992ebe (diff)
downloadsddm-c713bca9ea51cec82471bb04cf0eec87f9e36912.tar.gz
sddm-c713bca9ea51cec82471bb04cf0eec87f9e36912.tar.bz2
sddm-c713bca9ea51cec82471bb04cf0eec87f9e36912.zip
update follower cuts to be more memory efficient by using ffill()
Diffstat (limited to 'utils/plot-energy')
-rwxr-xr-xutils/plot-energy8
1 files changed, 1 insertions, 7 deletions
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