Skip to content
Snippets Groups Projects
Commit 01dd48a8 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

streamthinca.backgroundcollector:

- add snr_min cut to remove sub-threshold triggers in case itac starts
  producing them
parent 65647ec3
No related branches found
No related tags found
No related merge requests found
......@@ -246,14 +246,14 @@ class backgroundcollector(object):
elif len(event_ids) == 1:
self.zerolag_singles.update(event_ids)
def pull(self, two_or_more_instruments, flushed_events):
def pull(self, snr_min, two_or_more_instruments, flushed_events):
index = dict((id(event), event) for event in flushed_events)
flushed_ids = set(index)
background_ids = self.timeshifted_coincs & flushed_ids
self.timeshifted_coincs -= flushed_ids
background_ids |= set(event_id for event_id in self.zerolag_singles & flushed_ids if index[event_id].end in two_or_more_instruments)
self.zerolag_singles -= flushed_ids
return map(index.__getitem__, background_ids)
return [event for event in map(index.__getitem__, background_ids) if event.snr >= snr_min]
class StreamThinca(object):
......@@ -377,7 +377,7 @@ class StreamThinca(object):
# screw around like this.
two_or_more_instruments.protract(1e-3) # 1 ms
for event in self.backgroundcollector.pull(two_or_more_instruments, flushed):
for event in self.backgroundcollector.pull(rankingstat.snr_min, two_or_more_instruments, flushed):
rankingstat.denominator.increment(event)
# add any triggers that have been used in coincidences for
......
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