I’m building an experiment which requires presentation of two images within a routine, side-by-side. One image is a target (i.e. correct response) and the other is a foil. I have an excel stimuli sheet with all the necessary picture files, target stimuli in one column and foil stimuli in another, however I would like the appearance of foil pictures to be fully random. At present, PsychoPy reads out each row such that the same target image is always paired with the same foil. Is there any way around this? Perhaps with the use of a code component?
Hi Lyam. There are two approaches to this. One does all the shuffling completely in code, the other actually reads in your conditions file, shuffles it, and writes it back to disk. The first is feasible (and possibly more flexible) if the number of variables and levels is small, the second more useful if the number of levels is large.
Can you suggest a solution to this problem? I’m having a similar issues - I have a master file and would like randomise 2 different variables independently, because at the moment they are tied together. I think one way to do it without coding would be to create a separate excel file for the second variable, but I don’t know how to refer to an excel file when defining an image (which is what the variable is).
Altrnatively, can you suggest how to deal with this problem using code component?