sensorlocs: Sensor locations

sensorlocsR Documentation

Sensor locations

Description

Define the sensorlocs object and associated methods.

Usage

sensorlocs(x, ...)

## Default S3 method:
sensorlocs(x, ...)

## S3 method for class 'sensorlocs'
plot(x, ...)

Arguments

x

The input data, either a data frame or a matrix (coerced to data frame). It should either contain the variables x, y, z or theta and phi. The coordinates should already be in the eegr coordinate system, i.e., no conversion is done.

...

other arguments passed to plot function

Details

A sensorlocs object is a data.frame containing sensor locations that can be used in further analyses or display. In order to match R's plotting functions, the coordinate system used in eegr models the head as a perfect sphere with a radius of 1 and the origin in the middle of the head (0,0,0), between the left and right pre-auricular fossae, and the line between teh nasion and inion (Towle et al, 1993). Sensor labels are as per the 10-5 electrode positioning system (Oostenveld & Praamstra, )

Within this system, Cartesian coordinates are defined along the following axes:

x

the X-axis points from the left (-) to right (+) pre-auricular points, i.e., positive values of x refer to sensors over the right hemisphere, whereas negative values of x refer to sensors over the left hemisphere.

y

the Y-axis points from the back of the head (inion, -) to the front (nasion, +), i.e., positive values of y refer to sensors over the anterior part of the brain, whereas negative values of y refer to sensors over the posterior part of the brain.

z

the Z-axis point from the bottom of the head (-) to the top (+) of body, i.e., positive values of z refer to sensors above the center of the head, whereas negative values of z refer to sensors below the center of the head.

Angular coordinates are defined as follows:

theta

Theta is the angle angle between the Z-axis and the X/Y-plane; positive values indicate sensors over the right hemisphere; negative values over the left.

phi

Phi is the angle between the X- and Y-axes, with positive values indicating counterclockwise rotation and negative values clockwise.

Value

a data frame of class 'sensorlocs' containing at least the variables x, y, z, x2d, y2d, theta, phi as per the eegr internal format described above. Other variables in the input data frame or matrix are copied unchanged to the output data frame. If a label variable was absent from the input x, then labels will be added based on the minimum spherical distance with electrodes in the EEGlocations dataset.

The calculation of the distance is based on the 'great circle distance' often used in Earth distance calculations. For further information see https://en.wikipedia.org/wiki/Great-circle_distance. There are 3 methods often used to compute the great circle distance, the law of cosines, the haversine formula, and the Vincenty formula. The latter is most accurate for small distances and is used in this function.

Author(s)

Geert van Boxtel, G.J.M.vanBoxtel@gmail.com

References

Oostenveld, R., Praamstra, P., 2001. The five percent electrode system for high-resolution EEG and ERP measurements. Clin. Neurophysiol. 112, 713-719.

Towle, V.L., et al. (1993). The spatial location of EEG electrodes: locating the best-fitting sphere relative to cortical anatomy. Electroencephal. Clin Neurophysiol. 86, 1-6.

Vincenty, T. (1975). Direct and Inverse Solutions of Geodesics on the Ellipsoid with Application of Nested Equations. Survey Review. Kingston Road, Tolworth, Surrey: Directorate of Overseas Surveys. 23 (176): 88–93. doi: https://dx.doi.org/10.1179/sre.1975.23.176.88.


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