def design_windowed_sinc_lpf(fc, bw):
N = Filter.get_filter_length_from_bandwidth(bw)
# Compute sinc filter impulse response
h = np.sinc(2 * fc * (np.arange(N) - (N - 1) / 2.))
# We use blackman window function
w = np.blackman(N)
# Multiply sinc filter with window function
h = h * w
# Normalize to get unity gain
h_unity = h / np.sum(h)
return h_unity
评论列表
文章目录