User Tutorial:Psychopy: Difference between revisions
Appearance
No edit summary |
|||
| (9 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
==Description== | ==Description== | ||
PsychoPy is an open-source application used to perform a large number of neuroscience, psychology, and psychophysics experiments. The video first describes the | PsychoPy is an open-source application used to perform a large number of neuroscience, psychology, and psychophysics experiments. The video first describes the three components that are developed to remotely start BCI2000 from PsychoPy, then lists the steps to follow to add the new components in the PsychoPy application and finally goes on to an example. | ||
==Tutorial== | ==Tutorial== | ||
<ol> | <ol> | ||
<li>Download the PsychoPy standalone version from the PsychoPy [https://www.psychopy.org/download.html downloads page].<br/> | <li>Download the PsychoPy standalone version from the PsychoPy [https://www.psychopy.org/download.html downloads page].<br/> | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy1.png | |||
</gallery> | |||
</li> | </li> | ||
<li>Copy the folders '''BCIStart''' and '''BCIUpdateState''' from the ''src/contrib/PsychoPy Components'' directory of your BCI2000 repository into the folder {$PsychoPyHome}\Lib\site-packages\psychopy\experiment\components | |||
<li>Copy the folders '''BCIStart''', '''BCIUpdateEvent''', and '''BCIUpdateState''' from the ''src/contrib/PsychoPy Components'' directory of your BCI2000 repository into the folder {$PsychoPyHome}\Lib\site-packages\psychopy\experiment\components | |||
<gallery mode="packed" widths=300px heights=300px> | |||
File:Psychopy2.png | |||
</gallery> | |||
</li> | </li> | ||
<li> | <li> | ||
Open PsychoPy and then open your experiment file (StroopExtended is what we use in the demo) | Open PsychoPy and then open your experiment file (StroopExtended is what we use in the demo) | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy3.png | |||
</gallery> | |||
</li> | </li> | ||
<li> | <li> | ||
Open the part of the experiment where you want to start BCI2000 | Open the part of the experiment where you want to start BCI2000 (in this case the ''instruct'' tab) and look under the custom section of the components for the '''BCI Connect''' and '''BCI Update Event''' components | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy4.png | |||
</gallery> | |||
</li> | </li> | ||
<li> | <li> | ||
Add the BCI2000 Start Component by clicking on it. | |||
</li> | </li> | ||
<li> | <li> | ||
Enter the path to the prog folder in the BCI2000 directory where your BCI2000Remote.py file exists | Enter the path to the prog folder in the BCI2000 directory where your BCI2000Remote.py file exists | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy5.png | |||
</gallery> | |||
</li> | </li> | ||
<li> | <li> | ||
Add the | Add the events that you want to record separated by commas (the first value will always be the default value and the second value will always be the maximum value). It is strongly recommended to use events instead of states, as events are recorded on a per-sample basis, while states are recorded on a pre-block basis. | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy6.png | |||
</gallery> | |||
</li> | </li> | ||
<li> | <li> | ||
Add the | Add the BCIUpdateEvent component to where you want to update event values. You can either choose to simply pass a variable through BCIUpdateEvent, or you can specify that it execute a specific Python script by choosing the "Use Expression" ticker | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy7.png | |||
</gallery> | |||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy8.png | |||
</gallery> | |||
</li> | </li> | ||
<li> | <li> | ||
Run the experiment | Run the experiment | ||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy9.png | |||
</gallery> | |||
<gallery mode="packed" widths=400px heights=400px> | |||
File:Psychopy10.png | |||
</gallery> | |||
</li> | </li> | ||
</ol> | </ol> | ||
| Line 55: | Line 106: | ||
[[Category:Tutorial]] | [[Category:Tutorial]][[Category:Video]] | ||
Latest revision as of 18:50, 12 May 2025
Description
PsychoPy is an open-source application used to perform a large number of neuroscience, psychology, and psychophysics experiments. The video first describes the three components that are developed to remotely start BCI2000 from PsychoPy, then lists the steps to follow to add the new components in the PsychoPy application and finally goes on to an example.
Tutorial
- Download the PsychoPy standalone version from the PsychoPy downloads page.
- Copy the folders BCIStart, BCIUpdateEvent, and BCIUpdateState from the src/contrib/PsychoPy Components directory of your BCI2000 repository into the folder {$PsychoPyHome}\Lib\site-packages\psychopy\experiment\components
-
Open PsychoPy and then open your experiment file (StroopExtended is what we use in the demo)
-
Open the part of the experiment where you want to start BCI2000 (in this case the instruct tab) and look under the custom section of the components for the BCI Connect and BCI Update Event components
- Add the BCI2000 Start Component by clicking on it.
-
Enter the path to the prog folder in the BCI2000 directory where your BCI2000Remote.py file exists
-
Add the events that you want to record separated by commas (the first value will always be the default value and the second value will always be the maximum value). It is strongly recommended to use events instead of states, as events are recorded on a per-sample basis, while states are recorded on a pre-block basis.
-
Add the BCIUpdateEvent component to where you want to update event values. You can either choose to simply pass a variable through BCIUpdateEvent, or you can specify that it execute a specific Python script by choosing the "Use Expression" ticker
-
Run the experiment
Video
Also see the PsychoPy page for more details on the installation process, APIs, and hooks.









