Skip to content
Snippets Groups Projects
Commit a33b90a7 authored by Luca Scarabello's avatar Luca Scarabello
Browse files

mpi: duplicated events detection fix

Allow tolerance of 0.1 seconds
parent 016e3cf9
No related branches found
Tags v0.4.1
No related merge requests found
...@@ -370,7 +370,8 @@ class TemplateMatching(object): ...@@ -370,7 +370,8 @@ class TemplateMatching(object):
i = self.events.bisect_key_left(time) # Locate the leftmost value exactly equal to time i = self.events.bisect_key_left(time) # Locate the leftmost value exactly equal to time
if i != len(self.events): if i != len(self.events):
ev_time, ev_amp, ev_template, ev_ccc = self.events[i] ev_time, ev_amp, ev_template, ev_ccc = self.events[i]
if ev_time == time and ev_template == template+1: if (ev_template == template+1 and
abs(ev_time - time) <= 0.1): #tolerance 0.1 seconds
self.logger.info("duplicated event found (%s)" % str(self.events[i]) ) self.logger.info("duplicated event found (%s)" % str(self.events[i]) )
continue continue
ev = (time, amp, template+1, ccc) ev = (time, amp, template+1, ccc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment