# scipy/scipy

Merged
merged 4 commits into from
+142 −2

### 3 participants

Also fixed a typo in a printed warning. Should that be converted to a raised warning or exception?

 endolith `DOC: Add See Also links for *ord functions` `fb01e88` endolith `DOC: Add examples with plots for filter design functions` `illustrating how the passband and stopband specs constrain the filter frequency response` `c78fc8d` endolith `Fix typo in warning` `a09d8dc`

Coverage remained the same when pulling a09d8dc on endolith:patch-3 into 6b6b41a on scipy:master.

commented on an outdated diff
scipy/signal/filter_design.py
 @@ -1548,6 +1657,37 @@ def ellipord(wp, ws, gpass, gstop, analog=False): The Chebyshev natural frequency (the "3dB frequency") for use with `ellip` to give filter results. + See Also + -------- + ellip : Filter design using order and critical points + buttord, cheb1ord, cheb2ord, : Find order and critical points
 SciPy member rgommers added a note Jan 23, 2014 Remove the comma after `cheb2ord`, otherwise the doc build crashes to join this conversation on GitHub. Already have an account? Sign in to comment
commented on an outdated diff
scipy/signal/filter_design.py
 ((9 lines not shown)) + iirfilter : General filter design using order and critical frequencies + iirdesign : General filter design using passband and stopband spec + + Examples + -------- + Design an analog highpass filter such that the passband is within 3 dB + above 30 rad/s, while rejecting -60 dB at 10 rad/s. Plot its + frequency response, showing the passband and stopband constraints in gray. + + >>> from scipy import signal + >>> import matplotlib.pyplot as plt + + >>> N, Wn = signal.ellipord(30, 10, 3, 60, True) + >>> b, a = signal.ellip(N, 3, 60, Wn, 'high', True) + >>> w, h = signal.freqs(b, a, np.logspace(0, 3, 500)) + >>> plt.plot(w, 20 * log10(abs(h)))
 SciPy member rgommers added a note Jan 23, 2014 `log10` is not defined so the plot generation crashes, use `np.log10` instead. This should be fixed in all examples in this PR. to join this conversation on GitHub. Already have an account? Sign in to comment
SciPy member

For the rest this looks good to me. Nice figures.

 endolith `DOC: Fix comma typo and missing example namespaces` `19d71f5`

Ok, fixed both of those.

Coverage remained the same when pulling 19d71f5 on endolith:patch-3 into 6b6b41a on scipy:master.

merged commit `7af62c8` into scipy:master

#### 1 check passed

Details default The Travis CI build passed
SciPy member

Thanks, merging

deleted the endolith:patch-3 branch
referenced this pull request
Closed

### BUG(?): filter order functions do not match Matlab #3219

It looks like I screwed something up. The images show up on http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.signal.ellipord.html and http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.signal.buttord.html, but not on http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.signal.cheb1ord.html and http://docs.scipy.org/doc/scipy-dev/reference/generated/scipy.signal.cheb2ord.html Any idea why?

Also the lines like

``````butter, cheby1, cheby2, ellip, bessel : Filter design using order and
critical points
``````

are not working. I guess they can't have commas in them?

I could reword it to

``````butter : Filter design using order and critical points
cheby1, cheby2, ellip, bessel
``````

also should have added an example/graph for `iirdesign`.

SciPy member

If you just paste the example into a clean IPython shell you'll see where it fails.The issue should be that you're using `pi` instead of `np.pi`. I failed to recheck the doc build after your last commit, my bad.

SciPy member

As for See Also, I think it's either a list of functions or a single function with a description behind it.

restored the endolith:patch-3 branch

I tried to add the fixes to the same patch, but they're not showing up here, maybe because it's already been merged?

They are visible here: endolith@137ace8

SciPy member

You indeed can't add commits to a PR that has been merged already. I'll cherry-pick and push that commit (after double checking it).

SciPy member

Pushed doc fix commit in 28f9d10

to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 23, 2014
1. endolith committed
2. endolith committed
`illustrating how the passband and stopband specs constrain the filter frequency response`
3. endolith committed
4. endolith committed
This page is out of date. Refresh to see the latest.
Showing with 142 additions and 2 deletions.
1. +142 −2 scipy/signal/filter_design.py
144 scipy/signal/filter_design.py