ssinterp: ssinterp

View source: R/ssinterp.R

ssinterpR Documentation

ssinterp

Description

Spherical spline interpolation of sensor locations

Usage

ssinterp(
  src,
  dest,
  lambda = 1e-05,
  order = 4,
  type = c("spline", "slap"),
  tol = 1e-07
)

Arguments

src

source sensor positions, specified as a data frame (or coerceable to a data frame), with 3 columns labeled x, y, and z.

dest

destination sensor positions, specified as a data frame (or coerceable to a data frame) with 3 columns labeled x, y, and z.

lambda

regularization parameter for smoothing the estimates, specified as a numeric scalar value. Default: 1e-5.

order

order of the polynomial interpolation to use, specified as a positive integer scalar value. Default: 4

type

character string specifying which interpolation method to use. One of "spline" - spherical spline interpolation) or "slap" - surface Laplacian (CSD). Default: "spline"

tol

tolerance for the Legendre polynomial approximation, specified as a numeric scalar value. Default: 1e-7.

Value

linear mapping matrix between old and new coordinates; a matrix with as many rows as the number of rows in dest and as many columns as the number of rows in src

Author(s)

Matlab code 2009 by Jason D.R. Farquhar (jdrf@zepler.org), adapted 2014 by Kay Robbins. R code by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com

References

Perrin, F., Pernier, J., Bertrand, O., & Echallier, J. F. (1989). Spherical splines for scalp potential and current density mapping. Electroencephalography and clinical neurophysiology, 72(2), 184-187.

Examples

src <- matrix(runif(300), 100, 3)
src[, 3] <- abs(src[, 3])
dest <- matrix(runif(90), 30, 3)
dest[, 3] <- abs(dest[, 3])
W <- ssinterp(src, dest)


gjmvanboxtel/eegr documentation built on May 20, 2023, 4:26 a.m.