fourierbasis {spatstat.geom}R Documentation

Fourier Basis Functions

Description

Evaluates the Fourier basis functions on a dd-dimensional box with dd-dimensional frequencies kik_i at the dd-dimensional coordinates xjx_j.

Usage

  fourierbasis(x, k, win = boxx(rep(list(0:1), ncol(k))))
  fourierbasisraw(x, k, boxlengths)

Arguments

x

Coordinates. A data.frame or matrix with nn rows and dd columns giving the dd-dimensional coordinates.

k

Frequencies. A data.frame or matrix with mm rows and dd columns giving the frequencies of the Fourier-functions.

win

window (of class "owin", "box3" or "boxx") giving the dd-dimensional box domain of the Fourier functions.

boxlengths

numeric giving the side lengths of the box domain of the Fourier functions.

Details

The result is an mm by nn matrix where the (i,j)(i,j)'th entry is the dd-dimensional Fourier basis function with frequency kik_i evaluated at the point xjx_j, i.e.,

1Wexp(2πil=1dki,lxj,l/Ll) \frac{1}{\sqrt{|W|}} \exp(2\pi i \sum{l=1}^d k_{i,l} x_{j,l}/L_l)

where LlL_l, l=1,...,dl=1,...,d are the box side lengths and W|W| is the volume of the domain (window/box). Note that the algorithm does not check whether the coordinates given in x are contained in the given box. Actually the box is only used to determine the side lengths and volume of the domain for normalization.

The stripped down faster version fourierbasisraw doesn't do checking or conversion of arguments and requires x and k to be matrices.

Value

An m by n matrix of complex values.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

Rolf Turner rolfturner@posteo.net

and Ege Rubak rubak@math.aau.dk

Examples

## 27 rows of three dimensional Fourier frequencies:
k <- expand.grid(-1:1,-1:1, -1:1)
## Two random points in the three dimensional unit box:
x <- rbind(runif(3),runif(3))
## 27 by 2 resulting matrix:
v <- fourierbasis(x, k)
head(v)

[Package spatstat.geom version 3.3-2 Index]