Ticket #581 (closed defect: fixed)
chebwin improvement: use the Chebyshev polynomial
| Reported by: | akumar | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.7.0 |
| Component: | scipy.signal | Version: | |
| Keywords: | Cc: | akumar@… |
Description
Hi!
I noticed that the Dolph Chebyshev I wrote earlier was not working due to some issues with the hyperbolic functions. For example:
In [2]: signal.chebwin(20, 50)
Out[2]:
array([ NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN,
NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN])
In [3]: signal.chebwin(10, 50)
Out[3]: array([ NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN])
I prodded it a bit, and found that the issue lies with the way I am calculating the Chebyshev polynomial. After two hours, I gave up and tried using the special.chebyt function, only to find that it works perfectly.
All values are matching the Matlab generated ones (from my test). I am attaching diff of signaltools.py, which applies against the HEAD of SVN. Please consider adding it.
Thanks.
Kumar Appaiah
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
