Python Autocorrelation & Cross-correlation

Cross-correlation is a measure of similarity of two waveforms as a function of a time-lag applied to one of them.

Autocorrelation is the cross-correlation of a signal with itself. It is a time domain analysis useful for determining the periodicity or repeating patterns of a signal.

* * *

Utility

The scripts on this page require the utility module tompy.py

* * *

Autocorrelation

The filtering relationship can be implemented in Python by importing the correlation function from scipy.

from scipy.signal import correlation

A script is given at autocorrelation.py

* * *

Cross-correlation

A script is given at cross_correlation.py

* * *

Reference Paper: The Autocorrelation Function

* * *

See also:  Auto & Cross-correlation Matlab

Tom Irvine

Advertisements