Jump to content

User Reference:ControlStateFilter

From BCI2000 Wiki
Revision as of 18:16, 14 April 2025 by Wengelhardt (talk | contribs) (Initial documentation of ControlStateFilter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function

The ControlStateFilter enables sending the control signal (output of the signal processing pipeline) to a state: ControlState. Any BCI2000 Expression can be used to control the ControlState, however using the signal will be the most useful.

Author

Will Engelhardt - engelhardt@neurotechcenter.org

Parameters

ControlExpression

This expression is evaluated at a sample-by-sample basis. Every sample is evaluated, and the result (true or false) is copied to the state ControlState.

States

ControlState

This state is a binary true or false state, controlled by the Control Expression. It can change on a sample-by-sample basis. This is useful when the signal source wants to use the output of the signal processing pipeline, because the evaluation can be copied into this state.

Integration

This filter is currently used for the ClosedLoopStim module, found in src/contrib/SignalProcessing. However, if desired for other modules, it could easily be moved to the shared folder to maximize flexibility.