Setting different nTrials for interleaved staircases

Hi all,

I’m coding an experiment wherein I will run 8 interleaved staircases. Half of the staircases use a valid attention cueing condition, and the other half use invalid cueing. I want the valid trials to comprise 82% of my total trials, and I want the invalid trials to make up the other 18%.

So I am trying to alter the nTrials for each staircase, but I can’t figure out a way to do this. The way I have been trying to go about this is to add a ‘trials’ column to my staircase excel sheet and then access that column for each condition to update the nTrials in my stairhandler object. This, however, does not work because it does not update the variable I use for my nTrials.

Attached below are the staircase excel sheet and code I have been trying to use to individually adjust nTrials (which has not been working).


stair.xlsx (10.9 KB)

Appreciate any suggestions for this problem!

Thanks,
Joseph

Update - This worked: