Re: [Numpy-discussion] convolution and wiener khinchin

2007-10-25 Thread Stefan van der Walt
Hi John The signals should be zero-padded, otherwise you get circular convolution: F = npy.fft.fft(r,len(r)+len(x)-1) X = npy.fft.fft(x,len(r)+len(x)-1) Y = F*X yi = npy.fft.ifft(Y)[:len(x)].real Also take a look at fftconv. Regards Stéfan On Thu, Oct 25, 2007 at 01:00:29PM -0500, John Hunter

[Numpy-discussion] convolution and wiener khinchin

2007-10-25 Thread John Hunter
I am working on an example to illustrate convolution in the temporal and spectral domains, using the property that a convolution in the time domain is a multiplication in the fourier domain. I am using numpy.fft and numpy.convolve to compute the solution two ways, and comparing them. I am getting