Computes the normalized correlation between two signals based on their Fourier representations.
.correlation(a, b)A numeric value representing the normalized correlation between the two signals.
A fftab object or signal representing the first input.
A fftab object or signal representing the second input.
This function computes the cross-spectrum of two signals, removes the DC component, and calculates the real part of the cross-spectrum sum. The result is normalized using the variances of both signals.
Normalization ensures that the correlation value lies between -1 and 1.