| Reference | Downloads | Github

Continuous Recognition task


I’m trying to create a continuous recognition task in psychopy (v1.84.2). Until now I have only used the Builder. For my experiment, I use 120 images, 80 images are repeated 3 times, the other 40 are only presented once. All images are located in an Excel file, the images that I want to be repeated 3 times are included 4 times in the Excel file, the others are only included once. I want to present the images randomized, but with a mean lag of 20 images between two presentations of the same image.

Does anybody know where and how I can make that work? Perhaps I can modify something in this code (I think, this is the relevant part of the code for the loop):

trials_Experiment = data.TrialHandler(nReps=1, method='random', 
    extraInfo=expInfo, originPath=-1,
    seed=None, name='trials_Experiment')
thisTrials_Experiment = trials_Experiment.trialList[0]

No, the built-in loop facility in PsychoPy (i.e. the TrialHandler) can’t possibly be flexible enough to deal with every possible pseudo-randomisation constraint that could be desired.

Hence, you have two options:

  • Hand-craft one or more fixed conditions files that meet your constraints.
  • Learn to write Python code so you can create condition lists on-the-fly as needed.