![Page 1: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/1.jpg)
PsychoPy
Sebastian Jentschke
UNIVERSITY OF BERGEN
![Page 2: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/2.jpg)
PsychoPy• Python-based software for running experiments• all major platforms (Win, Mac, Linux)• preliminary support for online experiments• precise timing
(«PsychoPy can achieve high levels of precision and accuracy in the presentation of brief visual stimuli»; Garaizar & Vadillo, PLOS 2014)
• GUI (Builder) and scripting (Coder)• free and open-source (www.psychopy.org)
UNIVERSITY OF BERGEN
PAGE 2
![Page 3: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/3.jpg)
PsychoPy
UNIVERSITY OF BERGEN
PAGE 3
![Page 4: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/4.jpg)
PsychoPy
UNIVERSITY OF BERGEN
PAGE 4
NewOpenSaveSave as...
SettingsCompileRunStop
Publish / run the study online
![Page 5: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/5.jpg)
PsychoPy• routines
– stimuli (text, images, sounds, videos;noise, dots, polygons [all: + aperture + grating])
– responses (keyboard, rating, slider, mouse; [sound] recording)
– custom (code, variable;static [waiting, e.g., to load image])
– I/O (parallel port)
• loops
UNIVERSITY OF BERGEN
PAGE 5
![Page 6: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/6.jpg)
PsychoPy
UNIVERSITY OF BERGEN
PAGE 6
![Page 7: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/7.jpg)
PsychoPy
UNIVERSITY OF BERGEN
PAGE 7
![Page 8: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/8.jpg)
PsychoPy: Components
UNIVERSITY OF BERGEN
PAGE 8
1. Click oncomponent(e.g., Text)to add it
2. Adjustsettingsand con-firm with«OK»
![Page 9: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/9.jpg)
PsychoPy: Components
UNIVERSITY OF BERGEN
PAGE 9
3. Text component added (right-click on component for changes [edit settings, rename, remove, etc.])
![Page 10: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/10.jpg)
PsychoPy: Components
UNIVERSITY OF BERGEN
PAGE 10
Click onFavorites,Stimuli, etc.to see morecomponents
![Page 11: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/11.jpg)
PsychoPy: Text
UNIVERSITY OF BERGEN
PAGE 11
• duration can be left empty(needs keyboard for termination)
• Text can be a fixed text or a variable
• letter height and position should be chosen to not overlap
• font should be chosen to be a standard one
![Page 12: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/12.jpg)
PsychoPy: Images
UNIVERSITY OF BERGEN
PAGE 12
• duration can be left empty(needs keyboard for termination)
• image can be a file name or a variable(constant vs. set every trial)
• position and size should be chosen to not overlap
• orientation (degrees) and opacity (0 – 1; 1 = solid)
![Page 13: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/13.jpg)
PsychoPy: Keyboard
UNIVERSITY OF BERGEN
PAGE 13
• duration can be left emptytick «Force end of Routine»
• multiple allowed key (comma-separated)
• font should be chosen to be standard
• store: nothing, first/last/all key(s)
![Page 14: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/14.jpg)
PsychoPy: Rating
UNIVERSITY OF BERGEN
PAGE 14
• stop can be left emptytick «Force end of Routine»(under Advanced)
• (numerical) lowest, highest, start
• labels at lowest, highest• store: nothing, history (Adv.)• untick «Show accept» (Adv.)
![Page 15: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/15.jpg)
PsychoPy: Experiment Settings
UNIVERSITY OF BERGEN
PAGE 15
background:(0,0,0) – grey(-1,-1,-1) – black(1,1,1) – white
tick excel + summariesuntick log file
remove «session» if notrequiredpossible addcharacteristics you want to store (age?, gender?)
![Page 16: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/16.jpg)
PsychoPy: Questionnaires• instruction(s): text(s) + keyboard (self-paced end)• loop over questionnaire items
– text (possibly image with prepared graphics to ensure
independence from fonts) + keyboard or rating– Bergen Insomnia Scale
https://helse-bergen.no/seksjon/sovno/Documents/BERGENINSOMNIASCALE1.pdf
– Excel / CSV file with items
• thank you and goodbye: text(s) + keyboard
UNIVERSITY OF BERGEN
PAGE 16
![Page 17: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/17.jpg)
PsychoPy: Questionnaires• size and position for question and response
instructions• response format and instructions
is there always the same response (not at all ... very much) or does it need to be variable?
• better use keyboard or rating?• which responses should be stored?
UNIVERSITY OF BERGEN
PAGE 17
![Page 18: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/18.jpg)
Assignment 1:Create a questionnaire yourself!
![Page 19: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/19.jpg)
PsychoPy: Experiments• instructions• loop over practice trials (with feedback)
– item presentation– feedback
• loop over experimental trials (without feedback)– item presentation, acquiring responses, possibly
feedback (see next slide for an implementation)
• thank you and good bye
UNIVERSITY OF BERGEN
PAGE 19
![Page 20: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/20.jpg)
PsychoPy: Code
UNIVERSITY OF BERGEN
PAGE 20
the code component can be usedto give feedback about correct orincorrect reponses; here by assign.an image one of two image files
define correct answer in key-board component
![Page 21: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/21.jpg)
Assignment 2:Discuss and (possibly) create a brief experiment!
![Page 22: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/22.jpg)
PsychoPy: Online experiments• register at pavlovia.org
UNIVERSITY OF BERGEN
PAGE 22
![Page 23: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/23.jpg)
PsychoPy: Online experiments• login from within PsychoPy:
UNIVERSITY OF BERGEN
PAGE 23
![Page 24: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/24.jpg)
PsychoPy: Online experiments• submit the project to pavlovia.org:
UNIVERSITY OF BERGEN
PAGE 24
![Page 25: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/25.jpg)
PsychoPy: Online experiments• run the project at pavlovia.org
UNIVERSITY OF BERGEN
PAGE 25
![Page 26: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/26.jpg)
PsychoPy: Literature and help• Peirce, J., & MacAskill, M. (2018). Building
Experiments in PsychoPy. London, UK: Sage Publications.
• https://www.psychopy.org/documentation.html• https://discourse.psychopy.org/
UNIVERSITY OF BERGEN
PAGE 26
![Page 27: PsychoPy - Universitetet i BergenPsychoPy • Python-based software for running experiments • all major platforms (Win, Mac, Linux) • preliminary support for online experiments](https://reader033.vdocuments.site/reader033/viewer/2022051915/60073ac8c3aab576831b6d9a/html5/thumbnails/27.jpg)
Thank you for your interest and yourattention!