I have two signals which are related to each other and have been captured by two different measurement devices simultaneously. Since the two measurements are not time synchronized there is a small time delay between them which I want to calculate. Additionally, I need to know which signal is the leading one.
The following can be assumed:
- no or only very less noise present
- speed of the algorithm is not an issue, only accuracy and robustness
- signals are captured with an high sampling rate (>10 kHz) for several seconds
- expected time delay is < 0.5s
I though of using-cross correlation for that purpose. Any suggestions how to implement that in Python are very appreciated.
Please let me know if I should provide more information in order to find the most suitable algorithmn.
Numpy has function
correlate
which suits your needs: https://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html