nsamples = 400
t = arange(nsamples) / sample_rate
wave = cos(2 * pi * 0.5 * t) + 0.2 * sin(2 * pi * 2.5 * t + 0.1) + 0.2 * sin(
    2 * pi * 15.3 * t) + 0.1 * sin(2 * pi * 16.7 * t + 0.1) + 0.1 * sin(2 *
    pi * 23.45 * t + 0.8)
nyq_rate = sample_rate / 2.0
width = 5.0 / nyq_rate
ripple_db = 60.0
N, beta = kaiserord(ripple_db, width)
cutoff_hz = 10.0
taps = firwin(N, cutoff_hz / nyq_rate, window=('kaiser', beta))
filtered_x = lfilter(taps, 1.0, wave)
Улучшение алгоритма обнаружения волн