This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def goertzel(samples, sample_rate, *freqs): | |
""" | |
Implementation of the Goertzel algorithm, useful for calculating individual | |
terms of a discrete Fourier transform. | |
`samples` is a windowed one-dimensional signal originally sampled at `sample_rate`. | |
The function returns 2 arrays, one containing the actual frequencies calculated, |