Changed rolling average window in selcal-detect
This commit is contained in:
parent
9a63041a5e
commit
5f6ba13bfc
@ -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()}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user