Change from event-related to block design

Hello taicmac

the following code creates an index that you can use as an argument for the Selected row argument $Idx of a loop. I did not include shuffle-commands to simplify testing.

stimulus = "oops"
IdxList = []
Idx = []

neuIdx = list(range(0,30))
negvisIdx = list(range(30,60))
negneaIdx = list(range(60,90))
tmpIdx = [0,1,2]*10

for i in tmpIdx:
    if tmpIdx[i] == 0:
        for Jdx in range(3):
            IdxList.append(neuIdx.pop())
    elif tmpIdx[i] == 1:
        for Jdx in range(3):
            IdxList.append(negvisIdx.pop())
    elif tmpIdx[i] == 2:
        for Jdx in range(3):
            IdxList.append(negneaIdx.pop())

Idx = [str(i) for i in IdxList]

Best wishes Jens