psychopy.org | Reference | Downloads | Github

Create blocks with two steps and combine image with text

Hello all,

I am new to Psychopy and I am using the Builder view.

I am running version 1.85.4 on a Mac laptop.

I would like to create a timed Truth Value Judgment Task.
Each trial would include both image and text and would have the following structure:
• Step 1: Present an image together with a background text
• Step 2: Present the same image with a target sentence and ask the participants if the sentence is TRUE or FALSE

There are 8 different stories (i.e. 8 different images accompanied by text) and 24 target sentences, 3 for each story. That is, the stories will get repeated 3 times, each time with the same image and background text but with a different target sentence.

I would also like to randomise the trials, so that the order of trials is different for each participant.

I’ve read the blocks of trials and counterbalancing page and tried to follow the demo on BlockedTrials, but for some reason the images do not appear when I run the experiment (I can see the text).

I am not sure how to build my experiment and the tutorials I’ve found thus far do not address the issue of combining text and image or creating items with this 2-step procedure I would like to have.

Any advice would be much appreciated!

All the best,
Dimitra

Hi Dimitra,

First of all, well done for describing exactly what you want to do. That is half the battle.

PsychoPy can certainly do what you want, with no special arrangements. Your conditions file will need to have 24 rows and four columns. The first column is the background sentence and the second is the image file name. Each pair of those values will be repeated across three rows. The next column contains the target sentences, with a unique one per row, and the last column indicates whether or not that target sentence is true. In the loop dialog, you’ll select ‘random’ for the loop type so that the order varies across subjects.

At least from what you describe above, there is no need to do any blocking of trials: it seems like loop randomisation will provide everything you need.

There are a number of reasons why the image may not be appearing, so we need to know more details. Send us a screenshot of your image component dialog box, and also show us part of your conditions file so we can see how you are specifying the filenames.

Dear Michael,

thank you very much for the encouragement and for explaining what I need to do.

I was referring to the images on the demo, I can see my images fine, so I won’t worry about the demo for the moment.

I was able to follow your instructions and make it work, thank you.
I now have a different issue, which I don’t know how to resolve.

In some of the trials the position of the text with respect to the image changes, even though they should follow the same routine, where I have specified the position. I have checked the excel file for spaces and there doesn’t seem to be any. Any ideas of why this is happening and how I can fix it?

I attach two screenshots, so you get an idea.

Thank you very much,
All the best,
Dimitra

The position of a text stimulus is the centre of the stimulus. As a string of characters gets longer, they will be displayed further to the left and right of that centre point. I think this is what you are seeing above. You could address this by setting a value for the wrap width of the text stimulus (look on its “Advanced” tab). This will force the sentence to wrap down to next line once it hits a certain width, rather than keep growing horizontally.

Dear Michael,

thank you again for the prompt response.
It makes sense, thanks.

All the best,
Dimitra