real.fft: Fast calculation of the two-dimensional real Fourier...

Description Usage Arguments Value Author(s) Examples

Description

Fast calculation of the real Fourier transform. This is a wrapper function for a C function which uses the complex FFT function from the 'fftw3' library.

Usage

1
real.fft(w,n,inv=TRUE,indFFT=NULL)

Arguments

w

A spatial field in a stacked vector of length N=n^2.

n

Number of grid points on each axis. n x n is the total number of spatial points.

inv

Indicates whether the inverse Fourier transform should be calculated or not.

indFFT

A list of containing vectors of natural numbers representing indices used to transform between the real and the complex Fourier transform.

Value

A vector of length n*n containing the real (inverse) Fourier transformation of 'w'.

Author(s)

Fabio Sigrist

Examples

1
2
3
4
n <- 100
spec <- matern.spec(wave=spate.init(n=n,T=1)$wave,n=n,rho0=0.05,sigma2=1,norm=TRUE)
sim <- real.fft(sqrt(spec)*rnorm(n*n),n=n,inv=FALSE)
image(1:n,1:n,matrix(sim,nrow=n),main="Sample from Matern field",xlab="",ylab="")


Search within the spate package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.