Reputation: 73
I'm trying to estimate the effect of applying a simple 1-2-1 filter for multiple times, and determined the residual scales. In specific, I'm trying to reproduce this plot:
I used the scipy.signal.freqz as below
filt = np.array([0.25,0.5,0.25])
w, h=signal.freqz(filt)
And I thought that for a repeating filter, I just need to multiply h by itself for many times (since it's in frequency domain, and filtering is just convolution.)
However, I cannot get the same plot as they did in the paper. I have three major questions,
I thought the 1-2-1 filter is just the triangle filter, is there other way to check its response in frequency domain?
How to check its frequency response for a repeating 1-2-1 filter in python? Isn't it just h times itself for multiple times?
I have hard time understanding the w(normalized frequency) unit in the freqz output. Could some one explain to me how to convert to wavenumber as in the plot?
Thank you.
Upvotes: 0
Views: 1182
Reputation: 73
It turned out that I was not wrong. By plotting the absolute value of the transfer function, and dividing the normalized frequeny by 2pi, I got the exact same plots, and applying mutilpe time of filter is exactly mutiplying the frequency response to itself for multiple times.
filt = np.array([0.25,0.5,0.25])
w, h=signal.freqz(filt)
plt.plot(w/(2*pi), abs(h**400), label='400 pass')
Comparison between frequency response of repeating 1-2-1 filter
Upvotes: 0