Back to Blog
Psychopy not defined5/26/2023 ![]() In the States field as shown in the image. Enter the path to the prog directory of BCI2000 (within which BCI2000Remote.py exists) in the Path field and correctKey 0 1 Start BCI2000 - Navigate to the instruct tab and click on BCI2000Start. Open the stroopExtended demo in PsychoPy. This state will be changed to 1 if the key pressed by user is correct, otherwise 0. In this tutorial, we will add a new state called correctKey in BCI2000 using PsychoPy. The stroopExtended demo asks user to press certain keys depending on the color shown on the screen and records the response time. The examples modify the demo stroopExtended (already provided by PsychoPy once you have unpacked the demos) and integrates BCI2000 within it. In this section, two examples are presented to help the user understand the use of BCI2000 within PsychoPy. Note: Make sure you don't run the experiments in full screen if you are using a single screen. Once you're under the Custom Components (in the rightmost column), you should see the two new components - BCI2000Start and BCI2000UpdateState as shown in the figure below. If you downloaded the standalone version installer, you can simply press the Windows key and search for PsychoPy. Start PsychoPy application by running "python \psychopy\app\psychopyApp.py" from wherever you cloned your PsychoPy repository. Run the following command in the terminal: Open the terminal and navigate to the PsychoPy home directory where setup.py resides. Notice that in the rightmost column, under Custom Components, there is no BCI2000 component.įor Windows, Copy the folders BCIStart and BCIUpdateState from the src/contrib/PsychoPy Components directory of your BCI2000 repository into the folder \psychopy\experiment\components. You can also download the PsychoPy standalone version from the PsychoPy downloads page.īelow is a picture of PsychoPy before integrating BCI2000. See Programming Reference:BCI2000Remote Class and User Reference:Operator Module Scripting for more details.Ĭlone PsychoPy from the PyschoPy repository. Note- the user would have to use commands such as bci.Execute and SET STATE to update the state in such cases. It is given for the cases where the Response Component Variable is not available and the user wants more control over how the state is updated. Expression The code to execute for each Frame. Use Expression If it is checked, the code written in 'Expression' is executed for each Frame and the variable specified in the Response Component Variable is not used to update the state. Note- the variable is written as $VariableName. Response Component Variable The variable to which the state is to be set OR the variable which contains the new value of the state. State Name The name of the state in BCI2000 to update. This component defines which state to update and when. You can also specify which parameters to use for the experiment and specify other command-line arguments with the BCI.LoadParameterRemote command. NOTE: You can specify the modules with which you want to run the experiment with the BCI.StartupModules command in the Init.py file previously copied into your PsychoPy environment. The states in the list are defined as follows: 'StateName defaultValue maxValue.' Eg: lastKey 0 255, correctKey 0 1. States List of new states to add to BCI2000. Path Path to the BCI2000 prog directory, which contains the BCI2000Remote.py file. This component starts up the BCI2000 modules remotely. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.For this project, you will need two things: BCI2000 compiled for your system and the newest version of PsychoPy. May still contain software viruses which could damage your computer system, you are advised to perform your own checks. This message has been checked for viruses but the contents of an attachment Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. Please do not use, copy or disclose the information contained in this message or in any attachment. If you have received this message in error, please send it back to me, and immediately delete it. This message and any attachment are intended solely for the addressee and may contain confidential information. > an email to To post to this group, send email to To view this discussion on the web visit > To unsubscribe from this group and stop receiving emails from it, send You received this message because you are subscribed to the Google ![]()
0 Comments
Read More
Leave a Reply. |