Jump to content

User Reference:SpatialFilter

From BCI2000 Wiki
Revision as of 17:57, 8 May 2007 by Atennissen (talk | contribs)

Function

The SpatialFilter computes an instantaneous linear transformation of its input. This linear transformation is described by a transformation matrix, and applied for each sample separately, not linking data across different points in time.

Typically, the SpatialFilter's input is the unfiltered brain signal from the source module.

Parameters

SpatialFilter is a matrix defining the linear transformation applied to the filter's input signal. In this matrix, columns represent input channels, and rows represent output channels. Each matrix element defines a weight with which the respective input channel (column) enters into the respective output channel (row).

If the spatial filter is an identity filter -- not modifying its input --, then the SpatialFilter matrix is a unit matrix (square matrix with ones on the main diagonal, and all other elements zero).

In a typical EEG experiment with fixed montage, you might want column labels to reflect the respective electrode location, simplifying the task of further modifications to the spatial filter.

States

None.

Examples

Linked Mastoids

Physical reference is to the left mastoid (A1). The right mastoid (A2) is recorded vs A1 on channel 1. All other electrodes are recorded vs A1 as well, and use the remaining channels. In your spatial filter, you will want to re-reference all channels against "linked mastoids", i.e. against the mean of A1 and A2.

In the spatial filter matrix, you want to subtract half of the A2 channel from each of the remaining channels:

Linked Mastoids
  A2 Fz Cz Pz ...
Fz' -1/2 1 0 0 ...
Cz' -1/2 0 1 0
Pz' -1/2 0 0 1
  ...

Common Average Reference

Signals are to be re-referenced against the average of all channels. To achieve this, begin with an identity matrix, and subtract a matrix of all ones, divided by the number N of input channels:

Common Average Reference
  Fz Cz Pz Oz ...
Fz' 1-1/N 1/N 1/N 1/N ...
Cz' 1/N 1-1/N 1/N 1/N
Pz' 1/N 1/N 1-1/N 1/N
Oz' 1/N 1/N 1/N 1-1/N
  ...