[Scipy-tickets] [SciPy] #902: need high, stop, pass options to signal.firwin

SciPy Trac scipy-tickets@scipy....
Wed Oct 20 11:32:08 CDT 2010

#902: need high, stop, pass options to signal.firwin
 Reporter:  tpk@…                 |       Owner:  somebody    
     Type:  enhancement           |      Status:  needs_review
 Priority:  normal                |   Milestone:  0.9.0       
Component:  scipy.signal          |     Version:  0.7.0       
 Keywords:                        |  

Comment(by warren.weckesser):


 As much as I prefer the default to be no scaling, you are right that the
 default should be True to be consistent with the old version.  I'll change
 that before I check in the code.

 The nonlinear phase issues is a bug, so it should be fixed.  I noticed
 that the matlab fir1 function automatically increases the number of taps
 in this case.  I don't particularly like that solution, and we can't
 really do that because that could also break existing code in a surprising
 way.  Of course, raising an exception also "breaks" existing code, but for
 a very good reason--the old code wasn't really working properly in the
 first place.

 A different solution would be to give the function a new name, and
 deprecate firwin.  Opinions, anyone?

 In the scaling calculation, because m is now properly symmetric, every
 term in exp(-1.j*pi*m*scale_frequency) contains its complex conjugate, so
 the sum will be real (other than normal machine precision issues).  In
 fact, we can change the calculation of the sum to
     s = numpy.sum(h*cos(pi*m*scale_frequency))
 and avoid complex numbers entirely.


Ticket URL: <http://projects.scipy.org/scipy/ticket/902#comment:15>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list