pydsm.correlations.raw_xcorr

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

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

Parameters:
xarray_like

first 1-D vector

yarray_like

second 1-D vector

Nint

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

Returns:
qndarray

the raw (unnormalized) crosscorrelation vector. Assuming that \(m_x\) and \(m_y\) are the lengths of x and y, \(q(k) = \sum_{n=k}^{\min(m_x-1,m_y+k-1)} x(n) y(n-k) \text{ for } k = 0 \dots 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.