OS (e.g. Win10): Win 7 64bit
PsychoPy version (e.g. 1.84.x): v.1.83.04
In my study, I present two images per trial for participants to respond to. I have many different parameters that specify how the two images are presented (image itself, position, size, etc.) so I have 192 unique conditions in my conditions file.
I would like to create 4 blocks of trials, with 128 trials each. What is important is that within each block of trials, I need an equal distribution of trials based on one specific parameter in my conditions file. There are 4 different values under that parameter, so 128/4 = 32 trials per value per block.
I would like to know how to randomly select a subset of conditions, but while keeping an even distribution based on one specific parameter. the other parameters don’t really matter so it’s ok if they’re a bit unbalanced at the end. The random selections should be without replacement.
I’m also not familiar with python so I would prefer a builder-only answer, but if it has to require code, if you could please explain to me what each line does so that I know for reference (I’m familiar with some coding language, as I use R for my analyzing).
I found some help in the psychopy website under for subsetting conditions using this code: random(4)*10 (to subset 4 random conditions from 11 conditions), but it didn’t see to work for me. I get the error message ‘NoneType’ object is not iterable.
Thank you very much!