Re: Coding Cross Correlation Function in Python

2009-12-02 Thread DarthXander
On Dec 2, 7:12 pm, sturlamolden wrote: > For two 1D ndarrays, the cross-correlation is > > from numpy.fft import rfft, irfft > from numpy import fliplr > > xcorr = lambda x,y : irfft(rfft(x)*rfft(fliplr(y))) > > Normalize as you wish, and preferably pad with zeros before invoking > xcorr. Thanks,

Re: Coding Cross Correlation Function in Python

2009-12-02 Thread sturlamolden
On 2 Des, 18:50, DarthXander wrote: > However to do this 700 times seems ridiculous. How would I get python > to perform this for me for t in a range of roughly 0-700? For two 1D ndarrays, the cross-correlation is from numpy.fft import rfft, irfft from numpy import fliplr xcorr = lambda x,y :