I have two curves represented by arrays a and b of the same size N.
I want to know if they are the same curve just shifted along x-axis.
In order to quantify this similarity, my first idea was to compute the euclidean distance point to point and sum them all. Then shift the array so next iteration I compare a(x) with b(x+k). And proceed with the iteration looking for a point where the sum of euclidean distances is the smaller.
If I find the k where the sum of the distances is smaller I can say that a and b are closest when I shift b by k.
The problem is, whenever I do a shift I start excluding points so distances are not the amount of distances compared are not the same between each iteration. So I need to use a subset of N and do fewer shifts.
What is the best way to find this? I remember something similar in University using convolution but I don't know if I am on the right track.
For context I am using python and numpy to compute this.