User Reference:StateTransform

From BCI2000 Wiki
Jump to: navigation, search


The StateTransform filter replaces state values with values of an arithmetic expression.

Typically, the StateTransform filter is used as a functional equivalent for cursor hit detection in off-line data analysis, using the output of the ConditionalIntegrator filter to determine cursor position.



Any number of transforms, specified in form of an (N x 2) matrix. Each row corresponds to a transform. Within a row, the first column gives the name of the state to be transformed, and the second column gives the expression replacing that state's value. The expression may also involve the value of the state it replaces.


Any state may be replaced, and any state may occur in the replacement expression.


When the cursor hits a target, a typical cursor movement task sets the ResultCode state to the number of the target that was hit. For the case of 1D feedback with two targets, and when the filter's input is the integrated control signal as output by the ConditionalIntegrator, the following StateTransforms matrix achieves this behavior:

State Expression
ResultCode (ResultCode>0)*(1+(Signal(1,1)>0))

See also

User Reference:Expression Syntax, User Reference:ConditionalIntegrator, BCI2000 Glossary#Control Signal