0
$\begingroup$

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?

$\endgroup$
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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