OS (e.g. Win10): MacOS Monteray
PsychoPy version (e.g. 1.84.x): 12.3.1
What are you trying to achieve?:
I am trying to use jittering for my fixation routine. The goal is for 8s, 10s, and 12s to be randomly selected as the fixation length within one loop. However each value should only be used 6 times (without replacement) to keep the overall timing of the overall constant
What did you try to make it work?:
Begin Experiment Tab Code:
x_duration = 0
Begin Routine Tab Code:
#creating jitter of 8, 10, and 12 seconds
#if trials_RunA_Round1.thisN in [0,17]:
if trials_RunA_Round1.thisN == 0:
list_name=[8,8,8,8,8,8,10,10,10,10,10,10,12,12,12,12,12,12]
np.random.shuffle(list_name)
x_duration = list_name.pop()
Text Fixation Component:
Entered in $x_duration for the duration
What specifically went wrong when you tried that?:
The experiment ran, however the only fixation length that was used was 8s (For some reason, the 10s and 12s lengths were completed excluded). So the without replacement part of the code is not working as well as the sampling from the other fixation length times. Thanks in advance!