psychopy.org | Reference | Downloads | Github

How do I insert labels together with images?

OS :win 8
PsychoPy version : 1.84.2

I want 4 labels appearing together with the images. Specifically, images are face expressions and the labels would be those expressions’ names (e.g. happiness). By pressing the correct key, the subject would end the face routine. Keys and labels would be constantly corresponding in terms of order (e.g. the rightmost label would correspond to the rightmost key, among the four keys allowed).

One way would be to have four TextStims and four ImageStims, position them on the screen, add a loop, and in your conditions file, one line will have eight columns:

im1 lab1 im2 lab2 … etc.

The value in the image cells would be the image file name, and the label cell would contain the label.

In the settings for the ImageStims, set the image to $im1 (set every repeat), and in the TextStim set text to $lab1 (set every repeat). That should be about it.

If I were you I would test it with one pair of image and text until you get it right, and then add the other three pairs. Save yourself some time.