[open] Block Randomisation with Inline Script at the Run Phase
I am using the following script to randomise across the blocks. This randomises the blocks presentations BUT the number of presentation is more than the number of blocks. Can you please advice have to fixit?
I also like to use the dummy variables in the the blocks to have special randomisation orders.
Thanks in advance,
from random import shuffle # Uncomment for 0.25 and before # exp = self.experiment # Create a list of items that are part of the sequence # These items must be present somewhere in the experiment. # An easy solution is to add them to a dummy_sequence at # the start of the trial and set the 'run if' statement of # the dummy_sequence to 'never'. item_list = ['loop1', 'loop2', 'loop3', 'loop4','loop5','loop6'] # Randomize the item order. Of course you can also do more # complicated things, such as have the order depend on the # subject nr, etc. shuffle(item_list) # First, prepare all items for item in item_list: exp.items[item].prepare() # Now run them! for item in item_list: exp.items[item].run()