scipy 1.8.0 Pypi GitHub Homepage
Other Docs
BackRef

To remove in the future –– scipy.signal

Signal processing (:mod:`scipy.signal`)

Convolution

.. autosummary:: 
    :toctree:generated/
    convolve           -- N-D convolution.
    correlate          -- N-D correlation.
    fftconvolve        -- N-D convolution using the FFT.
    oaconvolve         -- N-D convolution using the overlap-add method.
    convolve2d         -- 2-D convolution (more options).
    correlate2d        -- 2-D correlation (more options).
    sepfir2d           -- Convolve with a 2-D separable FIR filter.
    choose_conv_method -- Chooses faster of FFT and direct convolution methods.
    correlation_lags   -- Determines lag indices for 1D cross-correlation.

B-splines

.. autosummary:: 
    :toctree:generated/
    bspline        -- B-spline basis function of order n.
    cubic          -- B-spline basis function of order 3.
    quadratic      -- B-spline basis function of order 2.
    gauss_spline   -- Gaussian approximation to the B-spline basis function.
    cspline1d      -- Coefficients for 1-D cubic (3rd order) B-spline.
    qspline1d      -- Coefficients for 1-D quadratic (2nd order) B-spline.
    cspline2d      -- Coefficients for 2-D cubic (3rd order) B-spline.
    qspline2d      -- Coefficients for 2-D quadratic (2nd order) B-spline.
    cspline1d_eval -- Evaluate a cubic spline at the given points.
    qspline1d_eval -- Evaluate a quadratic spline at the given points.
    spline_filter  -- Smoothing spline (cubic) filtering of a rank-2 array.

Filtering

.. autosummary:: 
    :toctree:generated/
    order_filter  -- N-D order filter.
    medfilt       -- N-D median filter.
    medfilt2d     -- 2-D median filter (faster).
    wiener        -- N-D Wiener filter.

    symiirorder1  -- 2nd-order IIR filter (cascade of first-order systems).
    symiirorder2  -- 4th-order IIR filter (cascade of second-order systems).
    lfilter       -- 1-D FIR and IIR digital linear filtering.
    lfiltic       -- Construct initial conditions for `lfilter`.
    lfilter_zi    -- Compute an initial state zi for the lfilter function that
                  -- corresponds to the steady state of the step response.
    filtfilt      -- A forward-backward filter.
    savgol_filter -- Filter a signal using the Savitzky-Golay filter.

    deconvolve    -- 1-D deconvolution using lfilter.

    sosfilt       -- 1-D IIR digital linear filtering using
                  -- a second-order sections filter representation.
    sosfilt_zi    -- Compute an initial state zi for the sosfilt function that
                  -- corresponds to the steady state of the step response.
    sosfiltfilt   -- A forward-backward filter for second-order sections.
    hilbert       -- Compute 1-D analytic signal, using the Hilbert transform.
    hilbert2      -- Compute 2-D analytic signal, using the Hilbert transform.

    decimate      -- Downsample a signal.
    detrend       -- Remove linear and/or constant trends from data.
    resample      -- Resample using Fourier method.
    resample_poly -- Resample using polyphase filtering method.
    upfirdn       -- Upsample, apply FIR filter, downsample.

Filter design

.. autosummary:: 
    :toctree:generated/
    bilinear      -- Digital filter from an analog filter using
                     -- the bilinear transform.
    bilinear_zpk  -- Digital filter from an analog filter using
                     -- the bilinear transform.
    findfreqs     -- Find array of frequencies for computing filter response.
    firls         -- FIR filter design using least-squares error minimization.
    firwin        -- Windowed FIR filter design, with frequency response
                     -- defined as pass and stop bands.
    firwin2       -- Windowed FIR filter design, with arbitrary frequency
                     -- response.
    freqs         -- Analog filter frequency response from TF coefficients.
    freqs_zpk     -- Analog filter frequency response from ZPK coefficients.
    freqz         -- Digital filter frequency response from TF coefficients.
    freqz_zpk     -- Digital filter frequency response from ZPK coefficients.
    sosfreqz      -- Digital filter frequency response for SOS format filter.
    gammatone     -- FIR and IIR gammatone filter design.
    group_delay   -- Digital filter group delay.
    iirdesign     -- IIR filter design given bands and gains.
    iirfilter     -- IIR filter design given order and critical frequencies.
    kaiser_atten  -- Compute the attenuation of a Kaiser FIR filter, given
                     -- the number of taps and the transition width at
                     -- discontinuities in the frequency response.
    kaiser_beta   -- Compute the Kaiser parameter beta, given the desired
                     -- FIR filter attenuation.
    kaiserord     -- Design a Kaiser window to limit ripple and width of
                     -- transition region.
    minimum_phase -- Convert a linear phase FIR filter to minimum phase.
    savgol_coeffs -- Compute the FIR filter coefficients for a Savitzky-Golay
                     -- filter.
    remez         -- Optimal FIR filter design.

    unique_roots  -- Unique roots and their multiplicities.
    residue       -- Partial fraction expansion of b(s) / a(s).
    residuez      -- Partial fraction expansion of b(z) / a(z).
    invres        -- Inverse partial fraction expansion for analog filter.
    invresz       -- Inverse partial fraction expansion for digital filter.
    BadCoefficients  -- Warning on badly conditioned filter coefficients.

Lower-level filter design functions:

.. autosummary:: 
    :toctree:generated/
    abcd_normalize -- Check state-space matrices and ensure they are rank-2.
    band_stop_obj  -- Band Stop Objective Function for order minimization.
    besselap       -- Return (z,p,k) for analog prototype of Bessel filter.
    buttap         -- Return (z,p,k) for analog prototype of Butterworth filter.
    cheb1ap        -- Return (z,p,k) for type I Chebyshev filter.
    cheb2ap        -- Return (z,p,k) for type II Chebyshev filter.
    cmplx_sort     -- Sort roots based on magnitude.
    ellipap        -- Return (z,p,k) for analog prototype of elliptic filter.
    lp2bp          -- Transform a lowpass filter prototype to a bandpass filter.
    lp2bp_zpk      -- Transform a lowpass filter prototype to a bandpass filter.
    lp2bs          -- Transform a lowpass filter prototype to a bandstop filter.
    lp2bs_zpk      -- Transform a lowpass filter prototype to a bandstop filter.
    lp2hp          -- Transform a lowpass filter prototype to a highpass filter.
    lp2hp_zpk      -- Transform a lowpass filter prototype to a highpass filter.
    lp2lp          -- Transform a lowpass filter prototype to a lowpass filter.
    lp2lp_zpk      -- Transform a lowpass filter prototype to a lowpass filter.
    normalize      -- Normalize polynomial representation of a transfer function.

Matlab-style IIR filter design

.. autosummary:: 
    :toctree:generated/
    butter -- Butterworth
    buttord
    cheby1 -- Chebyshev Type I
    cheb1ord
    cheby2 -- Chebyshev Type II
    cheb2ord
    ellip -- Elliptic (Cauer)
    ellipord
    bessel -- Bessel (no order selection available -- try butterod)
    iirnotch      -- Design second-order IIR notch digital filter.
    iirpeak       -- Design second-order IIR peak (resonant) digital filter.
    iircomb       -- Design IIR comb filter.

Continuous-time linear systems

.. autosummary:: 
    :toctree:generated/
    lti              -- Continuous-time linear time invariant system base class.
    StateSpace       -- Linear time invariant system in state space form.
    TransferFunction -- Linear time invariant system in transfer function form.
    ZerosPolesGain   -- Linear time invariant system in zeros, poles, gain form.
    lsim             -- Continuous-time simulation of output to linear system.
    lsim2            -- Like lsim, but `scipy.integrate.odeint` is used.
    impulse          -- Impulse response of linear, time-invariant (LTI) system.
    impulse2         -- Like impulse, but `scipy.integrate.odeint` is used.
    step             -- Step response of continuous-time LTI system.
    step2            -- Like step, but `scipy.integrate.odeint` is used.
    freqresp         -- Frequency response of a continuous-time LTI system.
    bode             -- Bode magnitude and phase data (continuous-time LTI).

Discrete-time linear systems

.. autosummary:: 
    :toctree:generated/
    dlti             -- Discrete-time linear time invariant system base class.
    StateSpace       -- Linear time invariant system in state space form.
    TransferFunction -- Linear time invariant system in transfer function form.
    ZerosPolesGain   -- Linear time invariant system in zeros, poles, gain form.
    dlsim            -- Simulation of output to a discrete-time linear system.
    dimpulse         -- Impulse response of a discrete-time LTI system.
    dstep            -- Step response of a discrete-time LTI system.
    dfreqresp        -- Frequency response of a discrete-time LTI system.
    dbode            -- Bode magnitude and phase data (discrete-time LTI).

LTI representations

.. autosummary:: 
    :toctree:generated/
    tf2zpk        -- Transfer function to zero-pole-gain.
    tf2sos        -- Transfer function to second-order sections.
    tf2ss         -- Transfer function to state-space.
    zpk2tf        -- Zero-pole-gain to transfer function.
    zpk2sos       -- Zero-pole-gain to second-order sections.
    zpk2ss        -- Zero-pole-gain to state-space.
    ss2tf         -- State-pace to transfer function.
    ss2zpk        -- State-space to pole-zero-gain.
    sos2zpk       -- Second-order sections to zero-pole-gain.
    sos2tf        -- Second-order sections to transfer function.
    cont2discrete -- Continuous-time to discrete-time LTI conversion.
    place_poles   -- Pole placement.

Waveforms

.. autosummary:: 
    :toctree:generated/
    chirp        -- Frequency swept cosine signal, with several freq functions.
    gausspulse   -- Gaussian modulated sinusoid.
    max_len_seq  -- Maximum length sequence.
    sawtooth     -- Periodic sawtooth.
    square       -- Square wave.
    sweep_poly   -- Frequency swept cosine signal; freq is arbitrary polynomial.
    unit_impulse -- Discrete unit impulse.

Window functions

For window functions, see the scipy.signal.windows namespace.

In the scipy.signal namespace, there is a convenience function to obtain these windows by name:

.. autosummary:: 
    :toctree:generated/
    get_window -- Return a window of a given length and type.

Wavelets

.. autosummary:: 
    :toctree:generated/
    cascade      -- Compute scaling function and wavelet from coefficients.
    daub         -- Return low-pass.
    morlet       -- Complex Morlet wavelet.
    qmf          -- Return quadrature mirror filter from low-pass.
    ricker       -- Return ricker wavelet.
    morlet2      -- Return Morlet wavelet, compatible with cwt.
    cwt          -- Perform continuous wavelet transform.

Peak finding

.. autosummary:: 
    :toctree:generated/
    argrelmin        -- Calculate the relative minima of data.
    argrelmax        -- Calculate the relative maxima of data.
    argrelextrema    -- Calculate the relative extrema of data.
    find_peaks       -- Find a subset of peaks inside a signal.
    find_peaks_cwt   -- Find peaks in a 1-D array with wavelet transformation.
    peak_prominences -- Calculate the prominence of each peak in a signal.
    peak_widths      -- Calculate the width of each peak in a signal.

Spectral analysis

.. autosummary:: 
    :toctree:generated/
    periodogram    -- Compute a (modified) periodogram.
    welch          -- Compute a periodogram using Welch's method.
    csd            -- Compute the cross spectral density, using Welch's method.
    coherence      -- Compute the magnitude squared coherence, using Welch's method.
    spectrogram    -- Compute the spectrogram.
    lombscargle    -- Computes the Lomb-Scargle periodogram.
    vectorstrength -- Computes the vector strength.
    stft           -- Compute the Short Time Fourier Transform.
    istft          -- Compute the Inverse Short Time Fourier Transform.
    check_COLA     -- Check the COLA constraint for iSTFT reconstruction.
    check_NOLA     -- Check the NOLA constraint for iSTFT reconstruction.

Chirp Z-transform and Zoom FFT

.. autosummary:: 
    :toctree:generated/
    czt - Chirp z-transform convenience function
    zoom_fft - Zoom FFT convenience function
    CZT - Chirp z-transform function generator
    ZoomFFT - Zoom FFT function generator
    czt_points - Output the z-plane points sampled by a chirp z-transform

The functions are simpler to use than the classes, but are less efficient when using the same transform on many arrays of the same length, since they repeatedly generate the same chirp signal with every call. In these cases, use the classes to create a reusable function instead.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy

184 Elements
scipy.signal.exponential
scipy.signal.windows._windows.boxcar
scipy.signal._wavelets.morlet2
scipy.signal._filter_design.gammatone
scipy.signal._ltisys.dimpulse
scipy.signal._peak_finding.argrelextrema
scipy.signal._fir_filter_design.firwin
scipy.signal.bartlett
scipy.signal._bsplines.cspline1d_eval
scipy.signal._signaltools.order_filter
scipy.signal.windows._windows.barthann
scipy.signal._signaltools.choose_conv_method
scipy.signal._czt.CZT
scipy.signal.chebwin
scipy.signal.boxcar
scipy.signal._arraytools.even_ext
scipy.signal._signaltools.lfilter
scipy.signal.windows._windows.hann
scipy.signal._waveforms.square
scipy.signal._bsplines.cspline1d
scipy.signal._filter_design.cheb2ord
scipy.signal._signaltools.detrend
scipy.signal._filter_design.iirdesign
scipy.signal._peak_finding.peak_widths
scipy.signal._ltisys.lsim2
scipy.signal.blackmanharris
scipy.signal._filter_design.lp2lp
scipy.signal._signaltools.resample_poly
scipy.signal._ltisys.ZerosPolesGainDiscrete
scipy.signal._ltisys.ZerosPolesGainContinuous
scipy.signal.windows._windows.chebwin
scipy.signal.parzen
scipy.signal._filter_design.cheb1ord
scipy.signal._filter_design.buttord
scipy.signal._ltisys.dfreqresp
scipy.signal.windows._windows.dpss
scipy.signal._waveforms.sweep_poly
scipy.signal.barthann
scipy.signal._signaltools.oaconvolve
scipy.signal._bsplines.gauss_spline
scipy.signal._ltisys.dlti
scipy.signal._filter_design.iirfilter
scipy.signal._ltisys.dlti.bode
scipy.signal._filter_design.sosfreqz
scipy.signal._max_len_seq.max_len_seq
scipy.signal._filter_design.findfreqs
scipy.signal.windows._windows.general_cosine
scipy.signal._upfirdn.upfirdn
scipy.signal._czt.zoom_fft
scipy.signal.flattop
scipy.signal._spectral_py.check_NOLA
scipy.signal._ltisys.dstep
scipy.signal._fir_filter_design.minimum_phase
scipy.signal._spectral_py.check_COLA
scipy.signal._filter_design.ellip
scipy.signal.windows._windows.triang
scipy.signal._lti_conversion.tf2ss
scipy.signal.windows._windows.exponential
scipy.signal._filter_design.lp2bs
scipy.signal._signaltools.filtfilt
scipy.signal.windows._windows.blackman
scipy.signal.windows._windows.cosine
scipy.signal.gaussian
scipy.signal._fir_filter_design.kaiserord
scipy.signal._waveforms.sawtooth
scipy.signal._filter_design.butter
scipy.signal._ltisys.impulse
scipy.signal._filter_design.group_delay
scipy.signal._spectral_py.csd
scipy.signal.windows._windows.tukey
scipy.signal._ltisys.StateSpaceContinuous
scipy.signal._lti_conversion.cont2discrete
scipy.signal._filter_design.bessel
scipy.signal._filter_design.bilinear
scipy.signal.hann
scipy.signal._signaltools.correlate
scipy.signal.tukey
scipy.signal._ltisys.step
scipy.signal._bsplines.bspline
scipy.signal.bohman
scipy.signal._wavelets.cwt
scipy.signal._spectral_py.istft
scipy.signal.hamming
scipy.signal.windows._windows.kaiser
scipy.signal.cosine
scipy.misc._common.electrocardiogram
scipy.signal._waveforms.chirp
scipy.signal._czt.czt_points
scipy.signal._ltisys.lti.bode
scipy.signal._signaltools.correlate2d
scipy.signal._signaltools.wiener
scipy.signal._signaltools.sosfilt_zi
scipy.signal.windows._windows.get_window
scipy.signal._ltisys.StateSpaceDiscrete
scipy.signal._bsplines.qspline1d
scipy.signal._ltisys.lsim
scipy.signal._signaltools.resample
scipy.signal._savitzky_golay.savgol_filter
scipy.signal._wavelets.ricker
scipy.signal._ltisys.StateSpace
scipy.signal._signaltools.cmplx_sort
scipy.signal._ltisys.step2
scipy.signal._spectral_py.lombscargle
scipy.signal._lti_conversion.ss2tf
scipy.signal._ltisys.TransferFunction
scipy.signal._filter_design.freqz
scipy.signal._filter_design.iirpeak
scipy.signal._signaltools.deconvolve
scipy.signal._signaltools.sosfiltfilt
scipy.signal._signaltools.correlation_lags
scipy.signal._bsplines.qspline1d_eval
scipy.signal._ltisys.bode
scipy.signal._waveforms.unit_impulse
scipy.signal
scipy.signal._filter_design.zpk2sos
scipy.signal._fir_filter_design.firls
scipy.signal._signaltools.decimate
scipy.signal._filter_design.freqz_zpk
scipy.signal.windows._windows.taylor
scipy.signal._signaltools.sosfilt
scipy.signal._ltisys.impulse2
scipy.signal._spectral_py.welch
scipy.signal.windows._windows.bartlett
scipy.signal._filter_design.lp2hp
scipy.signal.triang
scipy.signal.windows._windows.bohman
scipy.signal._spectral_py.spectrogram
scipy.signal._arraytools.odd_ext
scipy.signal._czt.ZoomFFT
scipy.signal._ltisys.place_poles
scipy.signal._ltisys.ZerosPolesGain
scipy.signal._fir_filter_design.kaiser_beta
scipy.signal._fir_filter_design.kaiser_atten
scipy.signal._peak_finding.find_peaks_cwt
scipy.signal._bsplines.cubic
scipy.fft._pocketfft.helper.set_workers
scipy.signal._arraytools.zero_ext
scipy.signal._spectral_py.periodogram
scipy.signal._savitzky_golay.savgol_coeffs
scipy.signal.blackman
scipy.signal.windows._windows.nuttall
scipy.signal._filter_design.freqs
scipy.signal.windows._windows.general_gaussian
scipy.signal._ltisys.TransferFunctionContinuous
scipy.signal._signaltools.unique_roots
scipy.signal.windows._windows.gaussian
scipy.signal.windows._windows.flattop
scipy.signal._peak_finding.argrelmax
scipy.signal._bsplines.quadratic
scipy.signal._ltisys.lti
scipy.signal._ltisys.freqresp
scipy.signal._filter_design.lp2bp
scipy.signal._signaltools.fftconvolve
scipy.signal._waveforms.gausspulse
scipy.signal._filter_design.iirnotch
scipy.signal._peak_finding.find_peaks
scipy.signal.windows._windows.general_hamming
scipy.signal._signaltools.lfilter_zi
scipy.signal.kaiser
scipy.signal._ltisys.dlsim
scipy.signal._bsplines.spline_filter
scipy.signal._fir_filter_design.remez
scipy.signal._spectral_py.coherence
scipy.signal.general_gaussian
scipy.signal._ltisys.TransferFunctionDiscrete
scipy.signal.windows._windows.parzen
scipy.signal._spectral_py.stft
scipy.signal._peak_finding.argrelmin
scipy.signal._signaltools.convolve
scipy.signal._peak_finding.peak_prominences
scipy.signal._filter_design.freqs_zpk
scipy.signal.nuttall
scipy.signal._filter_design.cheby1
scipy.signal._signaltools.hilbert
scipy.signal.windows._windows.blackmanharris
scipy.signal._fir_filter_design.firwin2
scipy.signal._filter_design.ellipord
scipy.signal._arraytools.const_ext
scipy.signal._filter_design.cheby2
scipy.signal._signaltools.convolve2d
scipy.signal.windows._windows.hamming
scipy.signal._filter_design.bilinear_zpk
scipy.signal._filter_design.iircomb
scipy.signal._ltisys.dbode

matplotlib

18 Elements
matplotlib.axes._axes.Axes.cohere
matplotlib.pyplot.angle_spectrum
matplotlib.axes._axes.Axes.magnitude_spectrum
matplotlib.mlab.csd
matplotlib.axes._axes.Axes.phase_spectrum
matplotlib.pyplot.psd
matplotlib.mlab.specgram
matplotlib.pyplot.csd
matplotlib.axes._axes.Axes.specgram
matplotlib.mlab.psd
matplotlib.pyplot.specgram
matplotlib.pyplot.cohere
matplotlib.mlab.cohere
matplotlib.pyplot.magnitude_spectrum
matplotlib.axes._axes.Axes.psd
matplotlib.pyplot.phase_spectrum
matplotlib.axes._axes.Axes.csd
matplotlib.axes._axes.Axes.angle_spectrum

skimage

skimage.restoration.deconvolution.wiener
skimage.restoration.deconvolution.unsupervised_wiener
skimage.restoration.deconvolution.richardson_lucy

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/signal/__init__.py#0
type: <class 'module'>
Commit: