User Tutorial:Psychopy: Difference between revisions
Appearance
mNo edit summary |
|||
| Line 5: | Line 5: | ||
<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/> | ||
[[File:Psychopy1.png]] | [[File:Psychopy1.png]] | ||
</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''' and '''BCIUpdateState''' from the ''src/contrib/PsychoPy Components'' directory of your BCI2000 repository into the folder {$PsychoPyHome}\Lib\site-packages\psychopy\experiment\components. | ||
[[File:Psychopy2.png]] | [[File:Psychopy2.png]] | ||
| Line 14: | Line 16: | ||
<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) | ||
[[File:Psychopy3.png]] | [[File:Psychopy3.png]] | ||
| Line 19: | Line 22: | ||
<li> | <li> | ||
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 | 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 | ||
[[File:Psychopy4.png]] | [[File:Psychopy4.png]] | ||
| Line 27: | Line 31: | ||
<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 | ||
[[File:Psychopy5.png]] | [[File:Psychopy5.png]] | ||
| Line 32: | Line 37: | ||
<li> | <li> | ||
Add the states 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) | Add the states 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) | ||
[[File:Psychopy6.png]] | [[File:Psychopy6.png]] | ||
| Line 37: | Line 43: | ||
<li> | <li> | ||
Add the BCIUpdateState component to where you want to update state values. You can either choose to simply pass a variable through BCIUpdateState, or you can specify that it execute a specific Python script by choosing the "Use Expression" ticker | Add the BCIUpdateState component to where you want to update state values. You can either choose to simply pass a variable through BCIUpdateState, or you can specify that it execute a specific Python script by choosing the "Use Expression" ticker | ||
[[File:Psychopy7.png]] | [[File:Psychopy7.png]] | ||
[[File:Psychopy8.png]] | [[File:Psychopy8.png]] | ||
| Line 44: | Line 52: | ||
<li> | <li> | ||
Run the experiment | Run the experiment | ||
[[File:Psychopy9.png]] | [[File:Psychopy9.png]] | ||
[[File:Psychopy10.png]] | [[File:Psychopy10.png]] | ||
Revision as of 17:26, 14 September 2021
Description
PsychoPy is an open-source application used to perform a large number of neuroscience, psychology, and psychophysics experiments. The video first describes the two 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 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
- Add BCI2000 Start Component
-
Enter the path to the prog folder in the BCI2000 directory where your BCI2000Remote.py file exists
-
Add the states 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)
-
Add the BCIUpdateState component to where you want to update state values. You can either choose to simply pass a variable through BCIUpdateState, 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.