Dot motion staircase in builder

Hi there.

I’m trying to implement a basic dot motion coherence staircase procedure. I want to home in on the coherence required for 80% accuracy using 1up-3down steps. I am not a strong coder but can make modifications to a code generated by builder.

I am having difficulty understanding how I am supposed to set elements of the dot motion stimuli if they are randomly selected based on the settings of my staircase. For instance, what am I supposed to put in the coherence box in the dot stimulus component if coherence is going to change? Same with direction of motion? The documentation concerning both staircases and the RDK component haven’t helped. How do I connect up coherence in the dot motion component with the min/max/start values in the staircase properties window?

Does anyone have any guidance, or can direct me to some, concerning these issues?
If it helps at all I’m currently running v1.83.01 on MacOS.

Thank you.

Sounds like you’d benefit from a workshop! :wink:
When using a staircase (or interleaved) there is a variable on every trial called level and you can use that to set the thing determined by the staircase.
For direction I supposed you aren’t setting that on the basis of the staircase are you? That’s just a condition or something? There are many ways to do that. You could have several interleaved staircases (one for each direction you want a threshold for) or set something as a variable created in a code component.

I would benefit from a workshop and I’d love to but its a long, expensive trip from New Zealand. Sounds like we’d benefit from a tour… :stuck_out_tongue:

Thanks a lot though. The level variable is exactly what I’m looking for. Assumed there had to be something.
As for direction, yeah I just want it random with equal left and right movement. Any builder solutions? Otherwise my code ability is probably at least sufficient for fitting something in their in coder, if need be.

If there’s sufficient demand then you might be able to get @Michael to run a workshop in NZ!

To create a random variable called direction you could do this:

if random()>0.5:
    direction = 0
else:
    direction = 180
# add our new variable to dotDirection column of data file:
trials.addData('dotDirection', direction)  

Hi @Henderga - did you manage to get this script working? I am trying to figure out the same thing with much the same issues!