Changed rolling average window in selcal-detect

This commit is contained in:
Jono Targett 2024-05-26 11:05:21 +09:30
parent 9a63041a5e
commit 5f6ba13bfc

View File

@ -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()}