From 5f6ba13bfc22bc58478ac2e982d557b8cf5dc208 Mon Sep 17 00:00:00 2001 From: Jono Targett Date: Sun, 26 May 2024 11:05:21 +0930 Subject: [PATCH] Changed rolling average window in selcal-detect --- scripts/selcal-detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/selcal-detect.py b/scripts/selcal-detect.py index cc080c9..72078a0 100755 --- a/scripts/selcal-detect.py +++ b/scripts/selcal-detect.py @@ -81,7 +81,7 @@ if __name__ == '__main__': pure_signals = {tone:note(freq, FLT_LEN, rate=sample_rate) for tone,freq in tones.items()} correlations = {tone:np.abs(signal.correlate(data, pure, mode='same')) for tone,pure in pure_signals.items()} - N = FLT_LEN # Rolling average length + N = FLT_LEN // 8 # Rolling average length cumsum_convolution = np.ones(N)/N massaged = {tone:np.convolve(correlation, cumsum_convolution, mode='valid') for tone,correlation in correlations.items()}