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

snax.pipeeparts: add queue after matrixmixer

parent 3e130f9f
No related branches found
No related tags found
No related merge requests found
......@@ -565,16 +565,15 @@ def mkextract(
# split into distinct frequency bins
out = {idx: tee for idx, wfs in enumerate(waveforms.index_by_bin(rate)) if len(wfs) > 0}
for idx, snrhead in out.items():
if len(out) == 1: # don't unnecessarily use a matrixmixer if we don't need to split up the stream
out[idx] = snrhead
else:
if len(out) > 1: # don't unnecessarily use a matrixmixer if we don't need to split up the stream
snrhead = pipeparts.mkqueue(pipeline, snrhead, max_size_buffers=1, max_size_bytes=0, max_size_time=0)
snrhead = pipeparts.mkmatrixmixer(pipeline, snrhead, matrix=waveforms.bin_mixer_coeffs(rate, idx))
snrhead = pipeparts.mkqueue(pipeline, snrhead, max_size_buffers=1, max_size_bytes=0, max_size_time=0)
out[idx] = pipeparts.mkmatrixmixer(pipeline, snrhead, matrix=waveforms.bin_mixer_coeffs(rate, idx))
# extract features from time series
if feature_mode == 'timeseries':
out[idx] = pipeparts.mktrigger(pipeline, out[idx], int(sample_rate // feature_sample_rate), max_snr=True)
out[idx] = pipeparts.mktrigger(pipeline, snrhead, int(sample_rate // feature_sample_rate), max_snr=True)
elif feature_mode == 'etg':
out[idx] = pipeparts.mktrigger(pipeline, out[idx], sample_rate, snr_thresh=snr_threshold)
out[idx] = pipeparts.mktrigger(pipeline, snrhead, sample_rate, snr_thresh=snr_threshold)
return out
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