The deconvolve(signal, divisor) function of scipy

> Deconvolves `divisor` out of `signal`. Returns the quotient and remainder such that `signal = convolve(divisor, quotient) + remainder`

The core codes of deconvolve are

num = atleast_1d(signal)
den = atleast_1d(divisor)
N = len(num)
D = len(den)
input = ones(N - D + 1, float)
input[1:] = 0
quot = lfilter(num, den, input)

It's quite different from any deconvolve methods I ever know, such as the frequency spectrum division.

Can anyone explain those behind the codes?


1 Answer 1


The deconvolution operation in the code is just finding the impulse response of a filter made up of a numerator which is the signal to be deconvolved and a denominator which is (effectively) the filter to do the deconvolution.

As far as deconvolution algorithms go, it is a little simplistic.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.