diff options
author | tlatorre <tlatorre@uchicago.edu> | 2020-11-01 11:14:23 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2020-11-01 11:14:23 -0600 |
commit | 43fa5ed691d849c7f8e7c2140f59100c39853d4d (patch) | |
tree | fad3b7902b3a1379c0d11d3af1ae1aab1d550f8e | |
parent | d36ee0ae1209e124f794db103b2258a73df20c89 (diff) | |
download | sddm-43fa5ed691d849c7f8e7c2140f59100c39853d4d.tar.gz sddm-43fa5ed691d849c7f8e7c2140f59100c39853d4d.tar.bz2 sddm-43fa5ed691d849c7f8e7c2140f59100c39853d4d.zip |
cut orphans instead of JUNK events
This commit updates get_events() to only cut orphans instead of all JUNK
events before calculating time differences. The reason is that some
large instrumental events (or muons) can get flagged as JUNK events
since they sometimes have multiple hits from the same PMT. If we remove
them before calculating the time difference, the follower might not get
cut. See run 10040 GTID 349491 for an example.
-rw-r--r-- | utils/sddm/plot_energy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/sddm/plot_energy.py b/utils/sddm/plot_energy.py index d9edf11..7852412 100644 --- a/utils/sddm/plot_energy.py +++ b/utils/sddm/plot_energy.py @@ -457,9 +457,9 @@ def get_events(filenames, merge_fits=False, nhit_thresh=None, apply_nhit_trigger first_gtid = rhdr.set_index('run').to_dict()['first_gtid'] - # First, remove junk events since orphans won't have a 50 MHz clock and so - # could screw up the 50 MHz clock unwrapping - ev = ev[ev.dc & DC_JUNK == 0] + # First, remove orphans since they won't have a 50 MHz clock and so could + # screw up the 50 MHz clock unwrapping + ev = ev[(ev.gtid == 0) & (ev.gtr == 0)] # We need the events to be in time order here in order to calculate the # delta t between events. It's not obvious exactly how to do this. You |