Folks, I'd need to compute the cross-correlation of two series. For the 1D case, I use numpy.correlate and select the last half of the result to get what I want. I need to work with 2Darrays, either by row, or by colum, or on the flattened array. I'm a bit at loss about what commands to use: scipy.signal.signaltools does not allow to work per axis. Any comments will be welcome Thanks in advance P.
On Tue, Sep 05, 2006 at 11:03:42PM -0400, PGM wrote:
Folks, I'd need to compute the cross-correlation of two series. For the 1D case, I use numpy.correlate and select the last half of the result to get what I want. I need to work with 2Darrays, either by row, or by colum, or on the flattened array. I'm a bit at loss about what commands to use: scipy.signal.signaltools does not allow to work per axis.
You can try computing cross-correlation axis-wise using the FFT (by reversing one of the input arguments). I attach an example of how to do convolution. Regards Stéfan
participants (2)
-
PGM -
Stefan van der Walt