This is documentation for an old release of SciPy (version 0.7.). Read this page in the documentation of the latest stable release (version 1.15.1).

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, ...]) 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) bspline(x,n): B-spline basis function of order n. uses numpy.piecewise and automatic function-generator.
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.
medfilt2
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.
deconvolve (signal, divisor) Deconvolves divisor out of signal.
hilbert (x[, N]) Compute the analytic signal.
get_window (window, Nx[, fftbins]) Return a window of length Nx and type window.
detrend (data[, axis, type, bp]) Remove linear trend along axis from data.
resample (x, num[, t, axis, window]) Resample to num samples using Fourier method along the given axis.

Filter design

remez (numtaps, bands, desired[, weight, Hz, type, ...]) Calculate the minimax optimal filter using Remez exchange algorithm.
firwin (N, cutoff[, width, window]) FIR Filter Design using windowed ideal filter method.
iirdesign (wp, ws, gpass, gstop[, analog, ftype, output]) 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.
freqs (b, a[, worN, plot]) Compute frequency response of analog filter.
freqz (b[, a, worN, whole, ...]) Compute frequency response of a digital filter.
unique_roots (p[, tol, rtype]) Determine the unique roots and their multiplicities in two lists
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 Linear Time Invariant class which simplifies representation.
lsim (system, U, T[, X0, interp]) Simulate output of a continuous-time linear system.
impulse (system[, X0, T, N]) Impulse response of continuous-time system.
step (system[, X0, T, N]) Step response of continuous-time system.

LTI Reresentations

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 and poles
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

sawtooth (t[, width]) Returns a periodic sawtooth waveform with period 2*pi which rises from -1 to 1 on the interval 0 to width*2*pi and drops from 1 to -1 on the interval width*2*pi to 2*pi width must be in the interval [0,1]
square (t[, duty]) Returns a periodic square-wave waveform with period 2*pi which is +1 from 0 to 2*pi*duty and -1 from 2*pi*duty to 2*pi duty must be in the interval [0,1]
gausspulse (t[, fc, bw, bwr, tpr, ...]) Return a gaussian modulated sinusoid: exp(-a t^2) exp(1j*2*pi*fc)
chirp (t[, f0, t1, f1, method, ...]) Frequency-swept cosine generator.

Window functions

boxcar (M[, sym]) The M-point boxcar window.
triang (M[, sym]) The M-point triangular window.
parzen (M[, sym]) The M-point Parzen window.
bohman (M[, sym]) The M-point Bohman window.
blackman (M[, sym]) The M-point Blackman window.
blackmanharris (M[, sym]) The M-point minimum 4-term Blackman-Harris window.
nuttall (M[, sym]) A minimum 4-term Blackman-Harris window according to Nuttall.
flattop (M[, sym]) The M-point Flat top window.
bartlett (M[, sym]) The M-point Bartlett window.
hann (M[, sym]) The M-point Hanning window.
barthann (M[, sym]) Return the M-point modified Bartlett-Hann window.
hamming (M[, sym]) The M-point Hamming window.
kaiser (M, beta[, sym]) Return a Kaiser window of length M with shape parameter beta.
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.
slepian (M, width[, sym]) Return the M-point slepian window.

Wavelets

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