August 9, 2022, 11:17am
I’m completely new to PsychoPy without any coding experience, and I would really appreciate any sort of help.
What are you trying to achieve?: : I have 90 pictures and 3 different conditions.
What did you try to make it work?: : I want each condition to appear in a pseudo-randomized order i.e., not more than twice in a row and without repetition.
What specifically went wrong when you tried that?:. : I managed to make it in a randomized order. But i’ve still problem with repetition.
How can i prevent this?
Any help will be greatly appreciated.
code : import random, xlrd
from numpy.random import choice
trial_loop = loopType : random
conditions : loop_repetititon.xlsx → nReps1, nReps2, nReps3
this question has been asked before. Look here
you need some code to do this.
These should give you the relevant information.
Best wishes Jens
@Mirjam provides a general solution here:
In your specific case, something like this might work:
Insert a code component on your trial routine (from the “Custom” component panel).
In its “begin experiment” tab, put something like this ( we need to run this at the start of the experiment since the code is non-deterministic: we don’t know how long it will take to run (realistically though, it will be a fraction of a second for only 12 entries):
stimulus_list = ['v', 'b', 'n', 'm'] * 3
Best wishes Jens
December 22, 2022, 1:19pm
Although I am late in responding, I thank the recommendations.
We added additional conditions besides the picture in three separate trials, which is how I came up with the following answer and avoided repetition: I created a list and prepared each condition as an excel file. I then used the pop.() function to stop the repetition.