In python, I have two similar signals of different lengths, and I want to find the offset between them.
I found this post: find time shift between two similar waveforms
But I don't understand the interpretation for different length signals.
For example:
a=[0,0,1,2,3]
b=[0,0,0,0,1,2,3,0]
and numpy.argmax(scipy.signal.correlate(a,b))
gives 5
, which I don't understand. numpy.argmax(scipy.signal.correlate(b,a))
gives 6
, which seems like the amount that b
should be shifted to the right, assuming wrap-around. Can someone please explain?