Psychopy: Difference between revisions

Jump to navigation Jump to search
No edit summary
 
(26 intermediate revisions by 4 users not shown)
Line 27: Line 27:
   {{Infobox tsg
   {{Infobox tsg
     | child              = yes
     | child              = yes
    | downloads          =
        * [https://gitlab.socsci.ru.nl/tsg/psychopytemplate  Template / Working Example]
        * []
        *  [Branches:]
        *  [https://gitlab.socsci.ru.nl/tsg/psychopytemplate/-/tree/basic-picture-text?ref_type=heads    basic example with text and picture]
        *  [https://gitlab.socsci.ru.nl/tsg/psychopytemplate/-/tree/basic-picture-text-sound?ref_type=heads    basic example with text and picture and sound]
        *  [https://gitlab.socsci.ru.nl/tsg/psychopytemplate/-/tree/basic-picture-text-microphone?ref_type=heads    basic example with text and picture and microphone]
        *  [https://gitlab.socsci.ru.nl/tsg/psychopytemplate/-/tree/basic-picture-text-sound-microphone?ref_type=heads    basic example with text and picture and sound and microphone]
        *  []
        *  [https://gitlab.socsci.ru.nl/tsg/psychopy2024.2.4install  installation files for Psychopy2024.2.4]
 
     | manuals            = {{bulleted list
     | manuals            = {{bulleted list
         | [https://www.socsci.ru.nl/wilberth/psychopy/index.html Course]
         | [https://www.socsci.ru.nl/wilberth/psychopy/index.html Course]
        | {{Download link|media=TemplatePsychopy2019.zip|Course Template|zip}}
    }}
    | downloads          = {{bulleted list
        | {{Gitlab|tsg/psychopy2024.2.4install|Installation files for Psychopy 2024.2.4}}
     }}
     }}
   }}
   }}
}}
}}
PsychoPy is an alternative to Presentation, e-Prime and Inquisit. It is a Python library and application that allows presentation of stimuli and collection of data for a wide range of neuroscience, psychology and psychophysics experiments. When used on DCC computers PsychoPy is guaranteed to be millisecond accurate.
PsychoPy is an alternative to Presentation, e-Prime and Inquisit. It is a Python library and application that allows presentation of stimuli and collection of data for a wide range of neuroscience, psychology and psychophysics experiments. When used on our [[Computers|lab computers]] and configured correctly, PsychoPy is guaranteed to be millisecond accurate.
 
Note: TSG only provides support for Psychopy Coder, '''not''' Builder! Applications made with Builder can typically still run on our lab computers, but we won't be able to help troubleshooting beyond basic OS and hardware configuration.
 
There are sample experiments to download from the infobox on this page.


==Installation==
==Installation==
<span class="shield" id="shield-python310")></span></br>
We recommend to use a modern 64-bit version of Python. In our labs, we currently have Python 3.10.11 64 bits installed. Psychopy recommends Python 3.10.11 or 3.8.10 TSG recommends Python 3.10.11
We recommend to use a modern 64-bit version of Python. In our labs, we currently have Python 3.10.11 64 bits installed. Psychopy recommends Python 3.10.11 or 3.8.10 TSG recommends Python 3.10.11


Check our gitlab server https://gitlab.socsci.ru.nl/tsg/psychopy2024.2.4install
Check our GitLab server: {{Gitlab|tsg/psychopy2024.2.4install}}
 


=== For Pavlovia users ===
=== For Pavlovia users ===
If you want to upload experiments to Pavlovia, you will need to install [https://github.com/git-for-windows/git/releases/download/v2.17.1.windows.1/Git-2.17.1-64-bit.exe Git-2.17.1-64-bit.exe] using these instructions: [https://gitlab.socsci.ru.nl/h.voogd/git-2.17.1.2-64-bit.exe/-/raw/master/GitInstall.docx GitInstall.docx]. Then, in
If you want to upload experiments to Pavlovia, you will need to install {{Download link|https://github.com/git-for-windows/git/releases/download/v2.17.1.windows.1/Git-2.17.1-64-bit.exe|Git-2.17.1-64-bit.exe}} using these instructions: {{Download link|https://gitlab.socsci.ru.nl/h.voogd/git-2.17.1.2-64-bit.exe/-/raw/master/GitInstall.docx|GitInstall.docx}}. Then, in
''System| Advanced system settings | Environment variables'', add the folder where ''git-daemon.exe'' is, to the PATH variable. Usually, that folder is named: 'C:\Program Files\Git\mingw64\libexec\git-core'.
''System| Advanced system settings | Environment variables'', add the folder where ''git-daemon.exe'' is, to the PATH variable. Usually, that folder is named: 'C:\Program Files\Git\mingw64\libexec\git-core'.


Line 57: Line 56:




A default version of Psychopy has been installed in the root of the Python3.8.10 64-bit version. This is also the default version when 'psychopy' is typed from the command prompt. It is also the default that opens when a .py file is double-clicked. It also can be started by clicking the appropriate icon on the desktop. One in a while, the default version is upgraded to a newer version. The older version is then still available in a virtualenv.
A default version of Psychopy has been installed in the root of the Python3.10.11 64-bit version. This is also the default version when 'psychopy' is typed from the command prompt. It is also the default that opens when a .py file is double-clicked. It also can be started by clicking the appropriate icon on the desktop. One in a while, the default version is upgraded to a newer version. The older version is then still available in a virtualenv. And is available in the Windows Start Menu.


   
   
Line 68: Line 67:


=== For SMI RED 500 and SMI HiSpeed Tower users ===
=== For SMI RED 500 and SMI HiSpeed Tower users ===
Include this file into your project: [https://gitlab.socsci.ru.nl/h.voogd/iviewxudp iViewXudp]. This should work on both 64-bit and 32-bit Python 3 versions.
Include this file into your project:{{Gitlab|h.voogd/iviewxudp|iViewXudp}}. This should work on both 64-bit and 32-bit Python 3 versions.


=== For Tobii Studio ===
=== For Tobii Studio ===
Check this link to connect to Tobii Studio:
Check this link to connect to Tobii Studio:{{Gitlab|h.voogd/tobiiclearviewtriggerapipython3}}
https://gitlab.socsci.ru.nl/h.voogd/tobiiclearviewtriggerapipython3
 
the tobii-research package is installed on our lab computers.
The tobii-research package is installed on our lab computers.


=== For Tobii Pro Lab ===
=== For Tobii Pro Lab ===
Line 89: Line 88:
'''workon <virtualenvname>''', where <virtualenvname> is the name of the virtualenv you want to use.<br>
'''workon <virtualenvname>''', where <virtualenvname> is the name of the virtualenv you want to use.<br>
'''mkvirtualenv <virtualenvname>''' to create a new and empty virtualenv.<br>
'''mkvirtualenv <virtualenvname>''' to create a new and empty virtualenv.<br>
'''mkvirtualenv -p=37 <virtualenvname>''' to create a new and empty virtualenv that uses the installed Python3.7.6.<br>
'''mkvirtualenv -p=310 <virtualenvname>''' to create a new and empty virtualenv that uses the installed Python3.10.11.<br>
'''mkvirtualenv -p=36 <virtualenvname>''' to create a new and empty virtualenv that uses the installed Python3.6.8.<br>
'''mkvirtualenv -p=38 <virtualenvname>''' to create a new and empty virtualenv that uses the installed Python3.8.10.<br>
'''mkvirtualenv -p=37 --system-site-packages <virtualenvname>''' to create a new virtualenv that uses the installed Python3.7 and its site-packages.<br>
'''mkvirtualenv -p=310 --system-site-packages <virtualenvname>''' to create a new virtualenv that uses the installed Python3.10 and its site-packages.<br>
'''rmvirtualenv <virtualenvname>''' to remove the virtualenv with name <virtualenvname>.<br>
'''rmvirtualenv <virtualenvname>''' to remove the virtualenv with name <virtualenvname>.<br>
'''deactivate''' to return to the defaults.
'''deactivate''' to return to the defaults.