I am hoping to use
scipy.signals.filtfilt() to smooth some signals in Python, and wanted to build the filter based on a window like a hanning window or whatever. E.g.:
import scipy.signal.windows as windows window = windows.hann(filter_width)
But standard filters don't just take in windows, they take in numerator and denominator transfer function coefficient arrays
data_smoothed = scipy.signal.filtfilt(b, a, data_noisy)
Is there a way to calculate the transfer function coefficients
b from a window? I like
filtfilt() more than straight-up convolution with the window because it has a lot of useful features baked in.