generate time continuous stochastic process for a given correlation function using Karhunen-Loève expansion