No worries, it just makes posts much easier to read and more likely to get answers.
This is a bit of a puzzle. An issue here is that you have ITIs.pop()
in the “Start” field. That gets called once at the start of each routine, but then afterwards we don’t have any way of knowing what value was selected. So that should actually be done in a code component, and assigned to a variable name, and then you use that variable name in the “start” field. That way, you can also record the chosen value in the data for each trial, or print it out for debugging purposes.
There is a second issue, in that you create and shuffle the list in the “begin routine” tab. That way, the values are selected again from scratch at the start of every trial, so values will often be repeated, and will be presented in an unbalanced way. You should either do that step in the “begin experiment tab”, or if you have multiple, nested loops, put it in the “begin routine” tab, but add a check so that it only occurs on the first trial, e.g:
if your_loop_name.thisN == 0: # only on the first trial
ITIs = blah blah
shuffle(ITIs)
ITI = ITIs.pop()
# record the chosen value in the data:
thisExp.addData('ITI', ITI)
# and put $ITI in the "start" field
# TEMPORARY debugging code to check:
print('ITI: ' + str(ITI))
Also note that your stopwatch value needs to take into account that it will not be starting from time 0
, but from when ITI
seconds have elapsed, so the expression should probably be something like this (again, showing why we need to store the value in a variable so that it can be used in several places):
$str(round(t - ITI, 1))