cupyx.scipy.signal.deconvolve#
- cupyx.scipy.signal.deconvolve(signal, divisor)[源代码][源代码]#
使用反滤波从
signal中解卷积divisor。返回商和余数,使得
signal = convolve(divisor, quotient) + remainder- 参数:
signal ((N,) array_like) – 信号数据,通常是记录的信号
divisor ((N,) array_like) – 除数数据,通常是应用于原始信号的脉冲响应或滤波器
- 返回:
quotient (ndarray) – 商,通常是恢复的原始信号
remainder (ndarray) – 余数
参见
cupy.polydiv执行多项式除法(相同的操作,但也接受 poly1d 对象)
示例
对已被滤波的信号进行反卷积:
>>> from cupyx.scipy import signal >>> original = [0, 1, 0, 0, 1, 1, 0, 0] >>> impulse_response = [2, 1] >>> recorded = signal.convolve(impulse_response, original) >>> recorded array([0, 2, 1, 0, 2, 3, 1, 0, 0]) >>> recovered, remainder = signal.deconvolve(recorded, impulse_response) >>> recovered array([ 0., 1., 0., 0., 1., 1., 0., 0.])