From 6fc97e22fa2a8cc48a96b2ce22c4d55a8fd2b80f Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 3 Jan 2021 11:40:47 -0600 Subject: cache results from get_events() --- utils/plot-muons | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'utils/plot-muons') diff --git a/utils/plot-muons b/utils/plot-muons index 2616ad2..a37f223 100755 --- a/utils/plot-muons +++ b/utils/plot-muons @@ -102,11 +102,8 @@ if __name__ == '__main__': ev = ev[~np.isnan(ev.fmin)] ev_mc = ev_mc[~np.isnan(ev_mc.fmin)] - ev = ev.reset_index() - ev_mc = ev_mc.reset_index() - # Set all prompt events in the MC to be muons - ev_mc.loc[ev_mc.prompt & ev_mc.filename.str.contains("cosmic"),'muon'] = True + ev_mc.loc[ev_mc.prompt,'muon'] = True # First, do basic data cleaning which is done for all events. ev = ev[ev.signal | ev.muon] -- cgit