Universität Wien

200145 SE Anwendungsseminar: Geist und Gehirn (2019W)

Programming psychological experiments in Python

4.00 ECTS (2.00 SWS), SPL 20 - Psychologie
Prüfungsimmanente Lehrveranstaltung

Anwendungsseminare können nur fürs Pflichtmodul B verwendet werden! Eine Verwendung fürs Modul A4 Freie Fächer ist nicht möglich.

An/Abmeldung

Hinweis: Ihr Anmeldezeitpunkt innerhalb der Frist hat keine Auswirkungen auf die Platzvergabe (kein "first come, first served").

Details

max. 20 Teilnehmer*innen
Sprache: Englisch

Lehrende

Termine (iCal) - nächster Termin ist mit N markiert

Dienstag 08.10. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 15.10. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 22.10. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 29.10. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 05.11. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 12.11. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 19.11. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 26.11. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 03.12. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 10.12. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 17.12. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 07.01. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 14.01. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 21.01. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610
Dienstag 28.01. 11:30 - 13:00 Hörsaal B Psychologie, NIG 6.Stock A0610

Information

Ziele, Inhalte und Methode der Lehrveranstaltung

This course is a general introduction to the Python programming language and to the Python-based PsychoPy software package for experimental purposes (stimulus presentation, recording). Each lesson will cover only a few basic programming concepts or functionalities, using plenty of practical examples. While we will eventually focus on experimental aspects (PsychoPy), this course should in any case give a strong fundamental programming knowledge that allows easy further individual learning of other uses of Python or of other programming languages as well. Partly to demonstrate this latter point, toward the end there will be a very short introduction to basic data processing and statistical analyses in R (just one lesson, see syllabus), and finally, if some spare time remains, a very short (and totally optional) introduction to programming web-based experiments in JavaScript.

Art der Leistungskontrolle und erlaubte Hilfsmittel

The grading will be based on the writing of a relatively simple PsychoPy script for experimental presentation. Any sort of material or help may be used for writing your script, but it has to be written by you (and so of course you have to know what each function or line of code does). Your script will have to be presented very shortly (e.g. 3-5 min) during one of the last lessons, after which you will get some feedback; the final code can be submitted anytime toward the end of the semester (deadline will be specified in due time).

Syllabus (approx.):
1. General introduction to Python. Main variable types, basic commands.
2. The random module. Lists, tuples, strings, and related methods.
3. IF – ELSE – conditional statements, FOR and WHILE loops.
4. Dictionary variables. Defining functions. Local and global variables.
5. Handling files and storing data.
6. Practice: writing small scripts for small games.
7. Exception handling. Classes. Basic data processing and analysis.
8. Introduction to PsychoPy. Input through GUI and screen settings.
9. Presenting stimuli. Timing: the core module.
10. Monitoring and recording input: keyboard and mouse.
11. R statistics intro.
12. Script presentations, feedback, corrections (& HTML, CSS.)
13. Script presentations, feedback, corrections (JS generally.)
14. Script presentations, feedback, corrections (JQuery; JS-HTML interactions.)
15. Script presentations, feedback, corrections (Web-app for experiments.)

Mindestanforderungen und Beurteilungsmaßstab

The PsychoPy script will have to be written at the end of the course, and it may present any sort of well-known or totally original psychological task (e.g. an example taken from an article or otherwise a task for your own upcoming thesis).

However, it should include the following elements:
- Welcome screen and instructions (~10 points)
- Presentation of stimuli according to the given task - including proper generation of possible items (or trial details) to be presented and possibly a balanced randomization of sequence order (~25 points)
- Recording of responses (~20 points)
- Feedback about the performance (extra points)
- End screen (~5 points)
- Output properly saved in a file, with all relevant data per each trial (~20 points)
- Automatic preprocessing and/or brief pre-analysis of results (extra points)

Grades approx.:
>=50 points: 4, >=63 points: 3, >=75 points: 2, >=87 points: 1

The points are just illustrative of the importance, there will be no detailed evaluation.

Alternatives may be possible (e.g. if you want to do some elaborate data analysis instead), but in that case first discuss it with me.

After most lessons, there will be some small script to write as homework.

Prüfungsstoff

Literatur

Material will be uploaded on moodle.

Recommended:
Dawson, Michael. Python programming for the absolute beginner. Cengage Learning, 2010.
http://www.psychopy.org/documentation.html
https://discourse.psychopy.org/
https://stackoverflow.com/
https://repl.it/languages/Python3

Zuordnung im Vorlesungsverzeichnis

Letzte Änderung: Mo 07.09.2020 15:21