Hello,
I have been using the signal.firwin FIR design tool and I have a
question about the implementation.
Scipy-0.4.8
Numpy-0.9.6
I am generating a kaiser window with the following parameters:
N = 128
Cutoff = ~4e7
width = .3
All of the special kaiser generation parameters in the function follow
Oppenheim and Schafer well. Even the sinc function for linear phase is
follows exactly.
However, the last line of the firwin function is causing me some
heartburn.
filter_design.py
1538 win = get_window(window,N,fftbins=1)
1539 alpha = N//2
1540 m = numpy.arange(0,N)
1541 h = win*special.sinc(cutoff*(m-alpha))
1542 return h / sum(h)
Line 1542 of filter_design.py, "return h / sum(h)", normalizes the
function where it doesn't seem necessary, at least in the kaiser window
case. Without the normalization, the kaiser window already returns a
value of 1 at the zero frequency point. This normalization scales all
of the data, making the window difficult to use in the frequency domain.
Can someone point me to the rationale for this line? Looking at the
code, this seems to be a pretty recent change (within the last year/year
and a half).
Thanks,
Eric Buehler
eric <dot> buehler <at> smiths-aerospace <dot> com
******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************