Hi @Paula,
Spontaneously, I can think of two possible solutions (if I have understood your description correctly):
- If your cat and sel trials are similar in structure (i.e., use the same components and the same timing), you might not need two separate loops for these trials
- Instead, you could randomise lists of your cat and sel stimuli independently and then zip the two lists (such that cat and sel stimuli alternate)
- This would be conceptually similar to the approach that @wakecarter suggested here
- If cat and sel trials however do differ in their structure, I would tend to put an extra loop around each of the inner loops; the sole function of these extra loops would be to determine whether or not the respective inner loop runs based on a modulo division of a trial counter
Hope this helps.
Jan