38 Formative PsychoPy quiz
🏠 Self-study
This is a formative PsychoPy quiz about content covered in Lab 6. You might find it helpful to return to these questions when revising for the January exam.
What is the relationship between “conditions” and “parameters” in a PsychoPy condition file?
The correct answer is that parameters are columns defining information about conditions, and conditions are the rows below the header. For example, parameters like ‘stim’ or ‘corrAns’ provide information about each condition (trial) in the experiment.
Which of the following names can you use in the header row of a conditions file? Select all that apply.
Only letters, numbers, and underscores are allowed. In addition, numbers must not come first.
You want this Image component to present images in your experiment:

Your images are inside a folder called “images” in the main experiment folder. The images are called left.png and right.png.
What is the correct setup for the input file?:

The correct option is:
Variable names in the Excel file header row must not use the dollar sign. The Image component uses “stim” as variable name, so the corresponding column in the Excel file must use “stim” as well. The images are in a subfolder, so the path to that subfolder must be added. The subfolder is called “images”, not “image”.
What is the main advantage of using loops in PsychoPy compared to creating individual routines for each trial? Select all that apply.
On the one hand, loops allow for efficient experiment creation by defining a trial template that can be repeated while updating information. Rather than creating hundreds of individual trial routines, loops let you create one template and repeat it with different parameters. On the other hand, they also make it easy to skip parts of the experiment by surrounding these parts with a loop and setting “Num. repeats” to 0.
You present three different geometric shapes in an experiment, one on each trial. The shapes defined in your input file are: circle, square, triangle. There are two repetitions of the input file, so six trials overall. The shapes are presented in the following order: circle, square, triangle, triangle, circle, square. What can you conclude about the “Loop type” settings? Select all that apply.
Loop type cannot be sequential as the order for the two repeats is not the same. Loop type might be random as the shapes are presented in groups: (circle, square, triangle) and (triangle, circle, square). Loop type might also be fullRandom, because a fullRandom order could of course result in a grouped order (there is just no guarantee that it will).
You want to present the letter K on half of your trials. The other half of the trials should present the letter G. These are your Text component properties:

Will this work?
This will not work because the Text field is not using a variable. Using “set every repeat” is necessary, but not sufficient. Adding a second Text component will not solve the problem either (it would simply present an additional letter). Using “$K” will also not help as the relevant part is to use a dollar sign and a variable name, not to prepend the actual stimulus with a dollar sign.
To modify the text presented by a Text component from one trial to the next, you must do the following:
- The variable name in the Text field must be preceded by:
- The variable name in the Text field must match:
- You should select the following option:
The variable name in the Text field must be immediately preceded by a $ sign, with no space in between. The variable name must match the relevant column header in the input file. “Set every repeat” should be selected. While “Set every frame” would also work, it is a poor choice if a stimulus only needs to be updated only once at the beginning of the trial.
Which of the following statements about component properties in PsychoPy are true? Select all that apply.
The correct answers are that if you want to change a component property across trials, it must be defined using a variable, and using variables allows for dynamic changes in component properties during the experiment.