extractors.frequency_estimator

Module: extractors.frequency_estimator

This program implements some of the frequency estimation functions from: https://gist.github.com/endolith/255291 and https://github.com/endolith/waveform-analyzer

Functions

mhealthx.extractors.frequency_estimator.freq_from_autocorr(signal, fs)

Estimate frequency using autocorrelation.

Pros: Best method for finding the true fundamental of any repeating wave, even with strong harmonics or completely missing fundamental

Cons: Not as accurate, doesn’t work for inharmonic things like musical instruments, this implementation has trouble with finding the true peak

From: https://gist.github.com/endolith/255291 and
https://github.com/endolith/waveform-analyzer
signal : list or array
time series data
fs : integer
sample rate
frequency : float
frequency (Hz)
mhealthx.extractors.frequency_estimator.freq_from_hps(signal, fs)

Estimate frequency using harmonic product spectrum.

Note: Low frequency noise piles up and overwhelms the desired peaks.

From: https://gist.github.com/endolith/255291 and
https://github.com/endolith/waveform-analyzer
signal : list or array
time series data
fs : integer
sample rate
frequency : float
frequency (Hz)