spheresim {FieldSim}R Documentation

Random spherical field simulation by the mifieldsim method on visual grid

Description

The function spheresim yields discretization of sample path of a Gaussian spherical field following the procedure described in Brouste et al. (2009).

Usage

spheresim(R,Ne=100,Nr=100,Ng=100,nbNeighbor=4)

Arguments

R a covariance function (defined on the sphere) of a Random spherical field to simulate.
Ne a positive integer. Ne is the number of simulation points associated with the uniform distributed discretization of the sphere for the first step of the algorithm (Accurate simulation step)
Nr a positive integer. Nr is the number of simulation points associated with the uniform distributed discretization of the sphere for the second step of the algorithm (Refined simulation step).
Ng a positive integer. Nr is the number of simulation points associated with the visual grid discretization of the sphere for the third step of the algorithm (Visual refined simulation step).
nbNeighbor a positive integer. nbNeighbor must be between 1 and 32. nbNeighbor is the number of neighbors to use in the second step of the algorithm.

Details

The function spheresim yields discretization of sample path of a Gaussian spherical field associated with the covariance function given by R.

Value

A list with the following components:

X the vector of length at more Ne+Nr+6Nr^2 containing the discretization of the x axis.
Y the vector of length at more Ne+Nr+6Nr^2 containing the discretization of the y axis.
Z the vector of length at more Ne+Nr+6Nr^2 containing the discretization of the z axis.
W the vector of length at more Ne+Nr+6Nr^2 containing the value of the simulated field at point (X[n],Y[n],Z[n])
W1,...,W6 the matrices of of size Ng^2 that give values of the simulated spherical field at the points of the visual grid
time the CPU time

Author(s)

Alexandre Brouste (http://subaru.univ-lemans.fr/sciences/statist/pages_persos/Brouste/) and Sophie Lambert-Lacroix (http://ljk.imag.fr/membres/Sophie.Lambert).

References

A. Brouste, J. Istas and S. Lambert-Lacroix (2009). On simulation of manifold indexed fractional Gaussian fields.

See Also

spheresimgrid,fieldsim,hypersim.

Examples

# load FieldSim library
library(FieldSim)

d<-function(x){ #Distance on the sphere
u <- x[1]*x[4]+x[2]*x[5]+x[3]*x[6]
if (u<(-1))
u<--1
if (u>1)
u<-1
acos(u)
}

# Example 1 : Fractional spherical field with RS1 covariance function

RS1<-function(x){
H<-0.45 # H can vary from 0 to 0.5
1/2*(d(c(1,0,0,x[1:3]))^{2*H}+d(c(1,0,0,x[4:6]))^{2*H}-d(x)^{2*H})
}

res1<- spheresim(RS1,Ne=100,Nr=1000,Ng=25,nbNeighbor=4)

library(rgl)
library(RColorBrewer)
printsphere(res1)

# Example 2 : Fractional spherical field with RS2 covariance function

RS2<-function(x){
H<-0.45 # H can vary from 0 to 0.5
exp(-d(x)^{2*H})
}

res2<- spheresim(RS2,Ne=100,Nr=1000,Ng=25,nbNeighbor=4)
printsphere(res2)

[Package FieldSim version 2.1 Index]