Random Dot Kinematogram - RDK with Staircase Procedure

Technical Manual

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond

Credits:
Millisecond thanks Dr. Aaron Seitz for his generous help with Random Dot Motion Displays!

Created: March 10, 2021

Last Modified: May 20, 2026 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script runs a double staircase procedure to find coherence thresholds for Random Dot Motion (RDM) (aka Random-Dot Kinematogram - RDK) displays. Random dot motion (RDM) displays are the gold standard stimulus types used in psychophysical and physiological studies of motion processing.

In this script, the random dot displays are presented via an animated html-element that uses the jsPsych framework (Josh de Leeuw, 2008) and the "jspsych-rdk.js" plugin (Rajananda, 2018).

References

Pilly, P.K. & Aaron R. Seitz, A.R (2009) What a difference a parameter makes: A psychophysical comparison of random dot motion algorithms, Vision Research, 49, 1599-1612, https://doi.org/10.1016/j.visres.2009.03.019.

Rajananda, S., Lau, H. & Odegaard, B., (2018). A Random-Dot Kinematogram for Web-Based Vision Research. Journal of Open Research Software. 6(1), p.6. DOI: [https://doi.org/10.5334/jors.194] ( Millisecond slightly edited the provided "jspsych-rdk.js" plugin code to allow the cross to be moved in the direction of the coherent dots).

Duration

7 minutes

Description

Each trial presents a random dot display for about 2s: a display of moving dots with X amount of dots that move in in a coherent direction and Y amount of randomly moving dots. At the end of the trial, a white cross is presented and participants are asked to choose the axis that shows the direction in which the majority of dots were moving.

Procedure

Trial Procedure
The procedure runs a double staircase procedure until pre-defined stopping points are reached.
Each trial presents a RDM display for about 2s. At the end of the trial, a white cross is presented
and participants are asked to choose the axis that shows the direction in which the majority of dots were moving.

Staircase Procedure:

• Start Values:
The implemented double staircase procedure is as follows:
- staircase1 starts at coherence = 0.15
- staircase2 starts at coherence = 0.05
- angle (=> direction) of signal dot movement is randomly selected from 24 possible values (list.angle)

•Task:
- two directional, orthogonal axes are provided and participant has to select the one that corresponds to the movement of the signal dots
- after 3 consecutive correct responses/selections (for the same staircase) the dot coherence for this staircase gets adjusted down
by = coherence * 0.9
- after 1 incorrect response the dot coherence for this staircase gets adjusted up
by = coherence/0.9

•Stopping points:
- after 7 reversal points a staircase stops
- if a participant reaches the extreme value coherence = 0.1 and gets it correct 3 times in a row, the staircase stops and coherence value for this staircase = 0.1
- if a participant reaches the extreme value coherence = 1.0 and gets it incorrect 3 times in a row, the staircase stops and coherence value for this staircase = 1
- the staircase procedure stops after 300 trials whether or not a threshold for each staircase has been found. In that case the last coherence tested is taken as the threshold for this staircase.

•Threshold calculation per staircase:
- if a participant reaches the extreme value coherence = 0.1 and gets it correct 3 times in a row, coherence value for this staircase = 0.1
- if a participant reaches the extreme value coherence = 1.0 and gets it incorrect 3 times in a row, coherence value for this staircase = 1
- the staircase procedure stops after 300 trials whether or not a threshold has been found. In that case the last coherence tested
is taken as the threshold for this staircase.
- otherwise: mean of the 7 (or fewer) reversal points

•Final Threshold:
- mean of the two staircase thresholds

Stimuli

The Random Dot Kinematrogram are displayed via an animated html-element
that uses the jsPsych framework (Josh de Leeuw, 2008) and the "jspsych-rdk.js" plugin
(Rajananda, 2018).

Dot Displays: General Info
- aperture Type: 1 = circle (values.apertureType piped into "jspsych-rdk.js")
- selected RDK Type: 4 (values.rdkType piped into "jspsych-rdk.js")

=> Signal dots can turn into noise dots & noise dots are randomly positioned in each frame
Each frame randomly dedicates some dots to be signals and others to be noise dots.
Thus a dot that moves as a signal dot from position2 to position3 might randomly be selected to be
a random noise dot for position4
(see Pilly & Seitz, 2009, figure1, p.3: "signal dots are recruited afresh from each frame to the next".
However, for each frame, the same number of dots are recruited to be signal dots.
Signal dots move in coherent fashion; noise dots are randomly placed

The number of signal vs. noise dots per position depends on the currently tested coherence.

Summary Data

File Name: staircase_rdkt_main_summary*.iqdat

Data Fields

NameDescription
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
inquisit.version Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
completed 0 = Test was not completed
1 = Test was completed
Settings
numberOfDots The number of dots in the dot display
dotSize The proportional sizing of the dot (proportional to canvas height)
radius The proportional radius (to canvas height) of the background circle (max: 0.5)
speed Movement 'speed' (as calculated as %screen height displacement per 'frame')
dotPositionDuration The duration (in ms) that a dot stays in one place
animationDuration The entire duration (in ms) of the animation (121*dotPositionDuration)
Data
thresholdStaircase1 The calculated coherence threshold for staircase1
thresholdStaircase2 The calculated coherence threshold for staircase2
threshold The mean of the two calculated thresholds

Raw Data

File Name: staircase_rdkt_main_raw*.iqdat

Data Fields

NameDescription
date Date the session was run
time Time the session was run
subject Participant ID
group Group number
session Session number
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
computer.touch 0 = device has no touchscreen capabilities; 1 = device has touchscreen capabilities
computer.hasKeyboard 0 = no external keyboard detected; 1 = external keyboard detected
blockcode The name the current block (built-in Inquisit variable)
blocknum The number of the current block (built-in Inquisit variable)
trialcode The name of the currently recorded trial (built-in Inquisit variable)
trialnum The number of the currently recorded trial (built-in Inquisit variable)
trialnum is a built-in Inquisit variable; it counts all trials run
even those that do not store data to the data file.
Constant Settings
rdkType 4: signal dots can turn into noise dots & noise dots are randomly positioned in each frame
apertureType 1 = circle
Settings
numberOfDots The number of dots in the dot display
dotSize The proportional sizing of the dot (proportional to canvas height)
radius The proportional radius (to canvas height) of the background circle (max: 0.5)
speed Movement 'speed' (as calculated as %screen height displacement per 'frame')
dotPositionDuration The duration (in ms) that a dot stays in one place
animationDuration The entire duration (in ms) of the animation (121*dotPositionDuration)
Trialdata
trialCounter Tracks the number of staircases trial run (max: 300)
staircase 1 vs. 2 (the current staircase run)
angle The angle (counterclockwise) of the directional movement of the signal dots
coherence The currently tested coherence
reversal 1 = reveral detected; 0 = no reversal
Per Staircase
staircase1Direction The coherence direction of the current staircase (1 = down, 2 = up)
staircase1Coherence The last tested coherence of staircase1
staircase1NewCoherence The next coherence to be tested for staircase1
staircase1ReversalCount The number of reversals for staircase1
staircase1MaxCoherenceCount The number of consecutive max (1.0) coherence tests for staircase1
staircase1MinCoherenceCount The number of consecutive min (0.1) coherence tests for staircase1
staircase1ConsecutiveCorrect The number of consecutive correct responses for staircase1
staircase1stop 1 = staircase1 has reached stopping point; 0 = staircase1 has not reached a stopping point yet
Dvs
response The participant's response
correctAxis
incorrectAxis
correct Accuracy of response: 1 = correct response; 0 = otherwise
latency The response latency (in ms); measured from: onset of axes display

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
skipParameterSelectionProcedure True: the RDM parameters (e.g. number of dots etc.) have been set a priori
false: the RDM parameters (e.g. number of dots etc.) are selected at start of script
false
Staircase Parameters
maxConsecutiveCorrect The number of consecutive correct responses before coherence gets reduced (= 3 down, 1 up staircase)3
stepSizeAdjustment Factor to adjust the current coherence
down: current coherence times factor
up: current coherence divided by factor
0.9
minimumCoherence 1 out of 100 is the minimum coherence that can be run with 100 dots0.01
maximumCoherence 1 is always the maximum coherence that can be run1
maxReversals The number of reversal points collected per staircase
reversal point = coherence at point of reversal of staircase direction
7
maxExtremeValues The number of times the staircase procedure is repeated
if participant continously works at one of the extreme values
3
staircase1StartCoherence The starting coherence for staircase10.15
staircase2StartCoherence The starting coherence for staircase20.05
runRandomTrials True: the script occasionally runs random dot displays
false: no random dot displays are run
false