Skip to content
Snippets Groups Projects
Commit 6507ef3a authored by ChiWai Chan's avatar ChiWai Chan
Browse files

streamthinca.py: create a new background collector for background estimation.

parent b63bc5cd
No related branches found
No related tags found
No related merge requests found
......@@ -221,6 +221,19 @@ class backgroundcollector(object):
return [event for event in map(index.__getitem__, background_ids) if event.snr >= snr_min]
class timereversebackgroundcollector(object):
def __init__(self):
self.events = set()
def push(self, event_ids, offset_vector):
# input parameters are just for compatibility
self.events.update(event_ids)
def pull(self, snr_min, two_or_more_instruments, flushed_events):
# input parameters are just for compatibility
return [event for event in flushed_events if event.snr >= snr_min]
class StreamThinca(object):
def __init__(self, xmldoc, process_id, delta_t, min_instruments = 2, sngls_snr_threshold = None):
self.ln_lr_from_triggers = None
......
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