From BCI2000 Wiki
Revision as of 18:18, 26 July 2019 by Dashmeetkaur (talk | contribs)
Jump to: navigation, search

PsychoPy is an open-source application using which a large number of neuroscience, psychology and psychophysics experiments can be performed.[1] This documentation described how to integrate BCI2000 in PsychoPy and its usage.

BCI2000 and PyschoPy

This section first describes the two components that are developed to remotely start BCI2000 from the PsychoPy and the second section lists the steps to follow to add the new components in the PsychoPy application.



The component starts up the BCI2000 modules remotely. The component takes two parameters:

Path to the BCI2000 prog directory which contains the file.
List of new states to add to the BCI2000. The states in the list are defined as follows: 'StateName defaultValue maxValue'. Eg:

lastKey 0 255, correctKey 0 1.


The component defines which state to update and when. It takes the following parameters:

State Name 
The name of the state in BCI2000 to update.
Response Component Variable 
The variable to which the state is be set OR the variable which contains the new value of the state.
Use Expression 
If it is checked, the code written in 'Expression' is executed for each Frame.
The code to execute for each Frame. It is given for the cases, where the variable is not available and the users want more control over how the state is updated.

Integrating BCI2000 into PyschoPy

Download the PsychoPy from the PyschoPy website.
Copy the following two folders BCIStart and BCIUpdateState in the folder {$PsychoPyHome}\psychopy\experiment\components. Open terminal and navigate to the PsychoPy home directory where resides. Run the following command in the terminal:
pip install -e . Start Psychopy application and in the builder view, under the Custom Components, you should see the two new components - BCI2000Start and BCI2000UpdateState as shown in the figure below.