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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s