15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SciPy Reference Guide, Release 0.8.dev<br />

If window is an array of the same length as x.shape[axis] it is assumed to be the window to be applied directly<br />

in the Fourier domain (with dc and low-frequency first).<br />

If window is a string then use the named window. If window is a float, then it represents a value of beta for a<br />

kaiser window. If window is a tuple, then the first component is a string representing the window, and the next<br />

arguments are parameters for that window.<br />

Possible windows are:<br />

‘flattop’ – ‘flat’, ‘flt’ ‘boxcar’ – ‘ones’, ‘box’ ‘triang’ – ‘traing’, ‘tri’ ‘parzen’ – ‘parz’, ‘par’ ‘bohman’ –<br />

‘bman’, ‘bmn’ ‘blackmanharris’ – ‘blackharr’, ‘bkh’ ‘nuttall’, – ‘nutl’, ‘nut’ ‘barthann’ – ‘brthan’, ‘bth’<br />

‘blackman’ – ‘black’, ‘blk’ ‘hamming’ – ‘hamm’, ‘ham’ ‘bartlett’ – ‘bart’, ‘brt’ ‘hanning’ – ‘hann’, ‘han’<br />

(‘kaiser’, beta) – ‘ksr’ (‘gaussian’, std) – ‘gauss’, ‘gss’ (‘general gauss’, power, width) – ‘general’, ‘ggs’<br />

(‘slepian’, width) – ‘slep’, ‘optimal’, ‘dss’<br />

The first sample of the returned vector is the same as the first sample of the input vector, the spacing between<br />

samples is changed from dx to<br />

dx * len(x) / num<br />

If t is not None, then it represents the old sample positions, and the new sample positions will be returned as<br />

well as the new samples.<br />

3.13.4 Filter design<br />

remez(numtaps, bands, desired[, weight, Hz, Calculate the minimax optimal filter using Remez exchange<br />

...])<br />

algorithm.<br />

firwin(N, cutoff[, width, window]) FIR Filter Design using windowed ideal filter method.<br />

iirdesign(wp, ws, gpass, gstop[, analog,<br />

...])<br />

Complete IIR digital and analog filter design.<br />

iirfilter(N, Wn[, rp, rs, btype, analog,<br />

...])<br />

IIR digital and analog filter design given order and critical points.<br />

freqs(b, a[, worN, plot]) Compute frequency response of analog filter.<br />

freqz(b[, a, worN, whole, plot]) Compute frequency response of a digital filter.<br />

unique_roots(p[, tol, rtype]) Determine the unique roots and their multiplicities in two lists<br />

residue(b, a[, tol, rtype]) Compute partial-fraction expansion of b(s) / a(s).<br />

residuez(b, a[, tol, rtype]) Compute partial-fraction expansion of b(z) / a(z).<br />

invres(r, p, k[, tol, rtype]) Compute b(s) and a(s) from partial fraction expansion: r,p,k<br />

remez(numtaps, bands, desired, weight=None, Hz=1, type=’bandpass’, maxiter=25, grid_density=16)<br />

Calculate the minimax optimal filter using Remez exchange algorithm.<br />

Description:<br />

Inputs:<br />

Calculate the filter-coefficients for the finite impulse response (FIR) filter whose transfer function<br />

minimizes the maximum error between the desired gain and the realized gain in the specified bands<br />

using the remez exchange algorithm.<br />

numtaps – The desired number of taps in the filter. bands – A montonic sequence containing the<br />

band edges. All elements<br />

must be non-negative and less than 1/2 the sampling frequency as given by Hz.<br />

desired – A sequency half the size of bands containing the desired gain<br />

in each of the specified bands<br />

weight – A relative weighting to give to each band region. type — The type of filter:<br />

334 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!