Skip to content
Snippets Groups Projects
Commit ac0a9400 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

feature_extractor.py: fix issue with missing channels in feature production...

feature_extractor.py: fix issue with missing channels in feature production due to using trigger_time rather than buffer time as a timestamp
parent 3ba38b46
No related branches found
No related tags found
No related merge requests found
......@@ -203,7 +203,7 @@ class MultiChannelHandler(simplehandler.Handler):
"""
with self.lock:
buf = elem.emit("pull-sample").get_buffer()
buftime = int(buf.pts / 1e9)
buftime = float(buf.pts / 1e9)
channel, rate = sink_dict[elem]
# push new stream event to queue if done processing current timestamp
......@@ -287,7 +287,7 @@ class MultiChannelHandler(simplehandler.Handler):
trigger_time = row.end_time + row.end_time_ns * 1e-9
# append row for data transfer/saving
timestamp = utils.floor_div(trigger_time, self.buffer_size)
timestamp = utils.floor_div(buftime, self.buffer_size)
feature_row = {'channel':channel, 'snr':row.snr, 'trigger_time':trigger_time, 'frequency':waveform['frequency'], 'q':waveform['q'], 'phase':row.phase}
self.feature_queue.append(timestamp, channel, feature_row)
......
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