PowerSpectralDensity2CovarianceFunction

Covariance function from Power Spectral Density (PSD). The inputfilePSD contains in the first column the frequency $[Hz]$, followed by (possibly multiple) PSDs $[unit^2/Hz]$. The output is a matrix, the first column containing time lag $[s]$ and the other columns the covariance functions $[unit^2]$. Conversion between PSD $p_j$ and covariance function $c_k$ is performed by discrete cosine transformation: \[ c_k = \frac{1}{4\Delta t (n-1)}\left(p_0 + p_{n-1} (-1)^k + \sum_{j=1}^{n-2} 2 p_j \cos(\pi jk/(n-1))\right). \] See also CovarianceFunction2PowerSpectralDensity.

NameTypeAnnotation
outputfileCovarianceFunction
filenamefirst column: time steps [seconds], following columns: covariance functions
inputfilePSD
filenamefirst column: frequency [Hz], following columns PSD [unit^2/Hz]