Custom Covariance Function
The default version of Custom produces a field of independent
random variables.
To replace it with your own covariance function, you have to
recompile this script. The necessary files and instructions
are available for download at http://www.math.umd.edu/~bnk/bak/SOURCE.
After downloading and unpacking please follow these steps:
- Open the file gaussian/LIB/fields.c.
- Locate the function cov.
- Modify the 'c' clause of the switch(covtype)
operator to return the value of your function. The variables
(x1, y1) and (x2, y2) are the coordinates of
the points between which you are
asked to return the covariance. You can use theta[0] and
theta[1] as covariance parameters.
- Go to the gaussian directory and type make clean.
- Type make FFTW_H=<fftw path>
FFTW_LIB=<fftw path> as explained in
the manual.
- This will create a file gaussian/CGI/generate.cgi
with the desired covariance function under "Custom".
See also Splus version at http://www.math.umd.edu/~bnk/bak/Splus