If .slice() is a problem, could you try the .concat command instead? e.g. for this line:
stim_unbiased_la = all_la_stim.slice(0, 3);
try:
stim_unbiased_la =stim_unbiased_la.concat(all_la_stim[0], all_la_stim[1], all_la_stim[2]);
Also, I am not sure you are using the util.shuffle command correctly. As far as I understand, that should be at the beginning of the experiment in an only JS code and then you can use shuffle in the JS code. See this related post:
Thank you for your answer @wakecarter . I did look at your crib sheet, perhaps it is me that just does not understand exactly how to use it. I would gladly remove the shuffle function and replace it by the util.shuffle.
Pictures is a list:
pictures = [...]
My pictures are loaded in correctly. I have tried implementing util.shuffle(). Where do I insert this exactly for the code to work? And how do I use it on my pictures stimuli?
For example like this?
shuffle = util.shuffle
picture1 = shuf…
Hope that helps!