Programming with PsychoPy, Final assignment
It is time for the grande finale: the final assignment. We prepared for you a template
with example functions, code snippets and useful comments. It contains the examples from this
course and much more. You can use these functions from the template directly or you can copy
them into your own experiment and change them. It often makes sense to change the name of the
function if you change it's behaviour. Look in lesson 6 to see how to use the functions directly.
As final assignment you will write an experiment.
We present a text which serves as prime. Then we show an action picture. The participant must indicate wether the
prime matches the action or not. There are both plausible and implausible actions. Will there be a faster reaction for
plausible actions? Will there be a faster reaction for matching primes?
You will need these files:
- all 24 action pictures
- all 48 different conditions
- a few useful functions, from lesson 6
- a well structured dummy experiment
- conditions for the dummy experiment
- Present fixation, Wait (1000 ms)
- Present prime for 800 ms ("to taste", "to smell", "to listen", "to look")
- Black screen Wait (jitter 500 - 1500 ms),
- Present action picture for for a maximum of (2000 ms) waiting for response
- Play correct or false sound
- Black screen for 700 ms
- Use the template to make a well structured experiment.
- Use the timeline to build up the experiment bit by bit, start with presenting a fixation cross. Do not write
huge chunks of code only to find out later that it doesn't work. Test after every addition.
- Create a 1000 ms delay and check the actual delay before the text stimulus is shown.
- Use the conditions file (stimuli.csv) the trials are defined in there.
- Read in a semicolon delimited file with the function my.getStimulusInputFile("stimuli.csv")
- Create all the text stimuli in the setup section
- Create all the picture in the setup section
- Add text "correct" and "incorrect" to the picture stimuli.
- Create a feedback for correct and incorrect responses.
- Present the text screen for 800 ms
- Present the black screen with a jitter of 500 - 1500 ms. hint; random.uniform()
- Present the picture stimulus
- Give the participant 2000 ms to react.
- Only except the responses "Y" and "N".
- Present a black screen for 200 ms
- Check with the conditions file's last column (n or y) if the answers given to the picture are correct and give feedback
- Log which button is pressed and the time the button is pressed.
- Log all the times when pictures are presented
- Write all the logged data to the hard disk use writer.writerow()
- Check if the output file is correct