lookiresponse.blogg.se

Visual task psychopy example code
Visual task psychopy example code












visual task psychopy example code

# Show the window (it should be empty, but we need it to record keyboard events) Copy-paste the following text and save it as “psychopy_keyboard_example.py”: # Import modules Now we will run a simple keyboard example script. Then use the terminal to run the file with a command: python psychopy_stimulus_example.py # Show the window after drawing the stimulus In essence, it shows that people respond faster and more accurately if there is a match between stimulus and response features (e.g., location, when for example stimulus and response are both located on the left side of one’s body). Together with his colleague, he first described this effect in 1963. Message = visual.TextStim(window, text='Stimulus!') The Simon task and the Simon effect are named after J. # Refresh/update the window (with the fixation point drawn on) # Prepare a fixation point (we will draw it in the next step)įixation = visual.TextStim(window, text='+') Open some text editor, e.g., Gedit (on Ubuntu), paste and save the following text to a filename named, e.g.: “psychopy_stimulus_example.py”: # Import modules Windows is generally not Python friendly, and installing all dependencies and virtual environments can be harder for a beginner even than installing a dual-boot Linux or just getting some old PC and installing Lubuntu there. I don’t recommend beginners using PsychoPy on Windows.

#Visual task psychopy example code install

Install PsychoPy: sudo pip install psychopy Open a terminal ( 5 Ways to Open a Terminal Console Window Using Ubuntu).

visual task psychopy example code

Hence, I prepared this basic example featuring: However, it seems that entry-level examples one can find in the web are rather sophisticated. Psychomotor Vigilance Task (PVT) in PsychoPy.

visual task psychopy example code

PsychoPy is an excellent tool for preparing psychological experiments in Python. For example, here is an APA citation: Marsja, E (2022, August 30).














Visual task psychopy example code