# Signal processing (scipy.signal)¶

## Convolution¶

 convolve(in1, in2[, mode]) Convolve two N-dimensional arrays. correlate(in1, in2[, mode]) Cross-correlate two N-dimensional arrays. fftconvolve(in1, in2[, mode]) Convolve two N-dimensional arrays using FFT. See convolve. convolve2d(in1, in2[, mode, boundary, fillvalue]) Convolve two 2-dimensional arrays. correlate2d(in1, in2[, mode, boundary, ...]) Cross-correlate two 2-dimensional arrays. sepfir2d sepfir2d(input, hrow, hcol) -> output

## B-splines¶

 bspline(x, n) B-spline basis function of order n. gauss_spline(x, n) Gaussian approximation to B-spline basis function of order n. cspline1d(signal[, lamb]) Compute cubic spline coefficients for rank-1 array. qspline1d(signal[, lamb]) Compute quadratic spline coefficients for rank-1 array. cspline2d cspline2d(input {, lambda, precision}) -> ck qspline2d qspline2d(input {, lambda, precision}) -> qk spline_filter(Iin[, lmbda]) Smoothing spline (cubic) filtering of a rank-2 array.

## Filtering¶

 order_filter(a, domain, rank) Perform an order filter on an N-dimensional array. medfilt(volume[, kernel_size]) Perform a median filter on an N-dimensional array. medfilt2d(input[, kernel_size]) Median filter a 2-dimensional array. wiener(im[, mysize, noise]) Perform a Wiener filter on an N-dimensional array. symiirorder1 symiirorder1(input, c0, z1 {, precision}) -> output symiirorder2 symiirorder2(input, r, omega {, precision}) -> output lfilter(b, a, x[, axis, zi]) Filter data along one-dimension with an IIR or FIR filter. lfiltic(b, a, y[, x]) Construct initial conditions for lfilter deconvolve(signal, divisor) Deconvolves divisor out of signal. hilbert(x[, N, axis]) Compute the analytic signal. get_window(window, Nx[, fftbins]) Return a window of length Nx and type window. decimate(x, q[, n, ftype, axis]) downsample the signal x by an integer factor q, using an order n filter detrend(data[, axis, type, bp]) Remove linear trend along axis from data. resample(x, num[, t, axis, window]) Resample x to num samples using Fourier method along the given axis.

## Filter design¶

 bilinear(b, a[, fs]) Return a digital filter from an analog filter using the bilinear transform. firwin(numtaps, cutoff[, width, window, ...]) FIR filter design using the window method. firwin2(numtaps, freq, gain[, nfreqs, ...]) FIR filter design using the window method. freqs(b, a[, worN, plot]) Compute frequency response of analog filter. freqz(b[, a, worN, whole, plot]) Compute the frequency response of a digital filter. iirdesign(wp, ws, gpass, gstop[, analog, ...]) Complete IIR digital and analog filter design. iirfilter(N, Wn[, rp, rs, btype, analog, ...]) IIR digital and analog filter design given order and critical points. kaiser_atten(numtaps, width) Compute the attenuation of a Kaiser FIR filter. kaiser_beta(a) Compute the Kaiser parameter beta, given the attenuation a. kaiserord(ripple, width) Design a Kaiser window to limit ripple and width of transition region. remez(numtaps, bands, desired[, weight, Hz, ...]) Calculate the minimax optimal filter using the Remez exchange algorithm. unique_roots(p[, tol, rtype]) Determine unique roots and their multiplicities from a list of roots. residue(b, a[, tol, rtype]) Compute partial-fraction expansion of b(s) / a(s). residuez(b, a[, tol, rtype]) Compute partial-fraction expansion of b(z) / a(z). invres(r, p, k[, tol, rtype]) Compute b(s) and a(s) from partial fraction expansion: r,p,k

## Matlab-style IIR filter design¶

 butter(N, Wn[, btype, analog, output]) Butterworth digital and analog filter design. buttord(wp, ws, gpass, gstop[, analog]) Butterworth filter order selection. cheby1(N, rp, Wn[, btype, analog, output]) Chebyshev type I digital and analog filter design. cheb1ord(wp, ws, gpass, gstop[, analog]) Chebyshev type I filter order selection. cheby2(N, rs, Wn[, btype, analog, output]) Chebyshev type I digital and analog filter design. cheb2ord(wp, ws, gpass, gstop[, analog]) Chebyshev type II filter order selection. ellip(N, rp, rs, Wn[, btype, analog, output]) Elliptic (Cauer) digital and analog filter design. ellipord(wp, ws, gpass, gstop[, analog]) Elliptic (Cauer) filter order selection. bessel(N, Wn[, btype, analog, output]) Bessel digital and analog filter design.

## Linear Systems¶

 lti(*args, **kwords) Linear Time Invariant class which simplifies representation. lsim(system, U, T[, X0, interp]) Simulate output of a continuous-time linear system. lsim2(system, **kwargs[, U, T, X0]) Simulate output of a continuous-time linear system, by using impulse(system[, X0, T, N]) Impulse response of continuous-time system. impulse2(system, **kwargs[, X0, T, N]) Impulse response of a single-input, continuous-time linear system. step(system[, X0, T, N]) Step response of continuous-time system. step2(system, **kwargs[, X0, T, N]) Step response of continuous-time system.

## LTI Representations¶

 tf2zpk(b, a) Return zero, pole, gain (z,p,k) representation from a numerator, denominator representation of a linear filter. zpk2tf(z, p, k) Return polynomial transfer function representation from zeros tf2ss(num, den) Transfer function to state-space representation. ss2tf(A, B, C, D[, input]) State-space to transfer function. zpk2ss(z, p, k) Zero-pole-gain representation to state-space representation ss2zpk(A, B, C, D[, input]) State-space representation to zero-pole-gain representation.

## Waveforms¶

 chirp(t, f0, t1, f1[, method, phi, vertex_zero]) Frequency-swept cosine generator. gausspulse(t[, fc, bw, bwr, tpr, retquad, ...]) Return a gaussian modulated sinusoid: exp(-a t^2) exp(1j*2*pi*fc*t). sawtooth(t[, width]) Return a periodic sawtooth waveform. square(t[, duty]) Return a periodic square-wave waveform. sweep_poly(t, poly[, phi]) Frequency-swept cosine generator, with a time-dependent frequency specified as a polynomial.

## Window functions¶

 get_window(window, Nx[, fftbins]) Return a window of length Nx and type window. barthann(M[, sym]) Return the M-point modified Bartlett-Hann window. bartlett(M[, sym]) The M-point Bartlett window. blackman(M[, sym]) The M-point Blackman window. blackmanharris(M[, sym]) The M-point minimum 4-term Blackman-Harris window. bohman(M[, sym]) The M-point Bohman window. boxcar(M[, sym]) The M-point boxcar window. chebwin(M, at[, sym]) Dolph-Chebyshev window. flattop(M[, sym]) The M-point Flat top window. gaussian(M, std[, sym]) Return a Gaussian window of length M with standard-deviation std. general_gaussian(M, p, sig[, sym]) Return a window with a generalized Gaussian shape. hamming(M[, sym]) The M-point Hamming window. hann(M[, sym]) The M-point Hanning window. kaiser(M, beta[, sym]) Return a Kaiser window of length M with shape parameter beta. nuttall(M[, sym]) A minimum 4-term Blackman-Harris window according to Nuttall. parzen(M[, sym]) The M-point Parzen window. slepian(M, width[, sym]) Return the M-point slepian window. triang(M[, sym]) The M-point triangular window.

## Wavelets¶

 cascade(hk[, J]) Return (x, phi, psi) at dyadic points K/2**J from filter coefficients. daub(p) The coefficients for the FIR low-pass filter producing Daubechies wavelets. morlet(M[, w, s, complete]) Complex Morlet wavelet. qmf(hk) Return high-pass qmf filter from low-pass