Counterbalancing Images sides which are presented by pairs on the screen

Hi,

I’m programming a task about presenting two images in the same moment on the screen, because my participants must calcule areas from the stimuli. In this way, for each trial I want to repleace my stimili according the next propouse: my first image must be in the left side and my second image must be in the right side at the same moment. Then, to the next trial my my first Image must be in the right side and my second image must be in the left side.

In adition, I have eight stimuli in the conditions’ sheet. They must be chosen randomly and counterbalancing randomly too for each trail.

I don’t know how to code it or state it into a spreadsheet of Excel. Does anyone have an idea how to achieve it, I was wondering if you help me.

@nicolasmuag , this would be best accomplished using Builder, as Builder will handle the looping, randomization etc. Take a look at the Stroop and Posner tutorials for Builder fundamentals. Also, take a look here for help with counterbalancing.

I’ve already seen those tutorials and I’ve red the chaper from the handbook. However, I’m trying to counterbalance the position of stimili and the radomly selections of two stimuli on the screen at the moment. I mean, on the screen will appear one image for the right and the left side. Then, for each trial the stimulus and the side must change.

edit: Neither tutorials nor the chaper haven’t been helpful for my exp.

Ok here is a quick example.

In the routine, there are two image components with fixed positions on the left and right side of the screen. The routine is in a loop (see flow at bottom of Builder window). The loop is given the cond.xlsx conditions file, which has two columns, pos1 and pos2, which are variables containing the paths to the images to be presented. There are two rows, one row for each trial. The variable (column) names in the conditions file (pos1 and pos2) are passed to the image components, in the image field - pos1 in imageLeft component and pos2 in imageRight component. The image field in the image components is set to update on every repeat, or every iteration of the loop, so on every trial a new image is passed to the image components. The loop is set to present the 2 rows of stimuli for 5 nReps, or 5 blocks, so in this example you will see 2 * 5 = 10 repetitions of the stimuli. The order is randomised, so the trial order within each block is random. Hope this helps you get your experiment up and running.

images.psyexp (8.3 KB)

cond.xlsx (8.2 KB)

i1

i2

1 Like

Thank you so much, it was so helpful.