rolling the variables after each trial
in OpenSesame
In my word learning experiment, participants have to see the stimuli in sequential order
S1 S2 S3 S4 S5 as a block loop.
Now I have to repeat the same block loop 5 times, each time rolling the variables (all the variables and not just the column) like
S2 S3 S4 S5 S1
S3 S4 S5 S1 S2
.
.
Where do I add the "roll 1" so that all the values in the table are rolled each time I execute the loop again.
Comments
Hi,
rollis an advanced loop operation that you need to enter into the script of theloopitem.Using a fixed
roll 1won't do the trick though, because it sounds like you want to roll the table incrementally, with a different value each time. And variables (e.g.roll [my_roll_value]) are not yet supported here.So you're probably best off modifying the
looptable in a script:For example, the following code (inserted before my_loop) will roll my_loop by one.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks Sebastiaan.
That one line of code solved it all.
Regards
aswv
Dear Sebastiaan,
The above code worked fine when I was adding variables directly from the interface. (loop - table option).
But when I am reading the values of the variables from a file, the rolling process is not working.
That's correct. The
loop.dmproperty corresponds to the table that you see when you open theloopitem. If you use an external source, thelooptable is bypassed. What you could do is load thelooptable from a file in the script as well. That way, you'll still be able to operate on it before the loop is executed:See:
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks again. Works perfect.
I had some difficulty initially because i had selected "set source file" inside my_loop and I was also reading data from file using the above code.
Now I set it as "set source table" and used the above code to read values from file. So it works now.