Convolution of two equally sized arrays [message #41964] |
Thu, 09 December 2004 15:03 |
Benjamin Hornberger
Messages: 258 Registered: March 2004
|
Senior Member |
|
|
Hi all,
IDL's convol() function requires the kernel to be smaller than the
array. Any ideas why?
According to Brigham, "The Fast Fourier Transform", the discrete
convolution is defined as
y(k) = Sum(i=0,N-1) x(i) * h(k-i)
where both x(k) and h(k) are periodic functions with period N.
So I would think that if I have two equally gridded functions (two
arrays a and b of equal size), I can convolve them by
result = convol(a, b, /edge_wrap, center=0)
and interchanging a and b should give the same result. I hope I
understood the center keyword right.
But anyway, it doesn't work because IDL wants the kernel to be smaller
than the array. Do I have to write my own convolution function?
Any hints?
Thanks,
Benjamin
|
|
|