Hi all,
I am relatively new to psychopy and have managed to build a version of my experiment in the builder. I have noticed a counterbalancing issue which I don’t think can be solved using conditions files and likely requires some code. Unfortunately, I don’t have any prior coding experience and I am struggling to apply the basics to this issue.
In the experiment I am creating a visual illusion using image stimulus objects based on the muller lyer illusion (see example below). There are 2 parallel lines displayed in the centre of the screen every trial and ‘tails’ at the end of each line. I have recreated this in the builder using 6 image objects (1 for each parallel line and 4 images for the tails).
I have used conditions files to vary the length of the top line (and the relative position of the tails) each trial between 5 variants (the baseline length (688 pix), 788 pix, 888 pix, 588 pix and 488 pix) whilst keeping the bottom images constant. However, for counterbalancing purposes I would like to vary this so that either the top OR bottom line could change length in each trial whilst the other remains at the baseline length.
Participants are going to do a 2-alternative forced choice task to determine which line is longer in each trial so I want to eliminate any potential confound of only having 1 line change every trial.
From what I can tell this wouldn’t be possible to do using conditions files as both the top and bottom stimuli would change randomly every repeat.
Here is the current structure of the experiment, showing the set up for the first routine:
and a labelled mockup of the bottom half of the screen:
To make things more complex I am also varying the display of the stimuli so that there are 2 conditions:
- where all the images are static (as described above)
- where the ‘tails’ at the end of each line flicker in a checkerboard pattern at a rate of approx 4 Hz
I have achieved this flickering effect by creating a second routine with the same structure as before but each stimulus is presented for 0.25 seconds and then looped for 80 repeats. The tails are then set to vary every repeat between 2 colour variants of the same image controlled by a conditions file. The length of the top line is then governed using the same structure as before.
Like this:
Ideally for both routines I want either of the two lines to vary randomly between the 5 possible lengths whilst the other is at the baseline length of 688 pix in each trial. If you have any ideas about how I could counterbalance the order of the routines (i.e static and flickering stimuli types) that would also be helpful.
Thanks in advance!