pydsm.correlations.raw_xcorr

pydsm.correlations.raw_xcorr(x, y, N)

Computes the raw crosscorrelation between two vectors up to lag N.

Parameters:

x : array_like

first 1-D vector

y : array_like

second 1-D vector

N : int

the maximum (positive) lag of the raw cross-correlation to return.

Returns:

q : ndarray

the raw (unnormalized) crosscorrelation vector. Assuming that mx and my are the lengths of x and y q(k) = sum_{n=k}^{min(mx-1,my+k-1)} x(n) y(n-k) for k = 0 ... N

Notes

the routine does not make any check on the lengths of x, y and N. It is responsibility of the user to assure that N<=len(y). In some cases (but only in some cases), zero padding is assumed.