Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Rotating 4 stimuli lists to 4 conditions?

Hi all,

Risking making a fool of myself here, but I have my experiment (attached here) in which I have 4 conditions. In each condition, 10 videos are presented. The way I have it now is that each condition has a unique list of 10 stimuli. However, I now need to make it possible that each condition can randomly run one of the 4 stimuli lists (loops). I need it so that stim set A is not always assigned to condition 1, stim set B not always assigned to condition 2 etc. Please note that the problem is not with counterbalancing or randomizing of the condition per se, but the assignment of each of the 4 stimuli lists to be displayed to each of the 4 conditions? in other words, I want to rotate the stimuli to condition assignment. Hopefully this make sense?

Any hints of how this can be achieved is very much appreciated!


Best wishes,


  • Hi Helio,

    The easiest way (in my opinion) is to use python coding inside an inline_script to assign lists to conditions. Using loop tables directly requires somewhat convoluted adjustments. In an inline_script, you can do stuff like this:

    import random
    conditions = ['a','b','c','d']
    stim_list = [[1,2,3],[3,2,1],[1,3,2],[3,1,2]]
    matches = zip(conditions,stim_list)

    Is that clear and does it help?


  • Hi Eduard, thank you for your response, unfortunately, I can't quite figure out how to implement this. Specifically, how do I assign the stimuli sequence produced by this script to the to the trial sequences in the block loops?

    thank you,

Sign In or Register to comment.