Randomizing and picking a specific number of trials in a larger trial pool

I have an idea which involves minimal coding.

Each of your spreadsheets contains 576 conditions (plus the header). If you put them all into one spreadsheet you could use the following code to select the rows. Create a code component in your first routine and add the following to Begin Experiment

rows = list(range(576))
useRows = []
shuffle(rows)
for Idx in range(48):
     useRows.append(rows[Idx])
shuffle(rows)
for Idx in range(48):
     useRows.append(rows[Idx]+576)
shuffle(rows)
for Idx in range(48):
     useRows.append(rows[Idx]+1152)

Then put $useRows in the selected rows.

N.B. I haven’t tested this.

2 Likes