Instrument2CrossCorrelationFunction
This program computes the cross correlation between all corresponding data columns in two instrument files. The instrument files must be synchronized (InstrumentSynchronize). The outputfileCorrelation is a matrix with the first column containing the time lag followed by cross-correlation function for each data column. The maximum lag is defined by the maximum arc length.
The correlation is based on the unbiased estimate of the cross-covariance between data columns $x$ and $y$, \[ \sigma_{xy}(h) = \frac{1}{N}\sum_{k=1} x_{k+h} y_k, \]which is averaged over all arcs. From this estimate, the correlation for each lag is then computed via \[ r_{xy}(h) = \frac{\sigma_{xy}(h)}{\sigma_x(0)\sigma_y(0)}, \]which is the ratio between the biased estimates of the cross-covariance at lag $h$ and the auto-covariance of the individual data columns.
For instrument with data gaps, lag bins without any data are set to NAN.
Name | Type | Annotation |
---|---|---|
outputfileCorrelation | filename | column 1: time lag, column 2..n cross-correlation |
inputfileInstrument | filename | |
inputfileInstrumentReference | filename |