Random Dot Kinematogram - RDK

Technical Manual

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

Created: March 10, 2021

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

Script Copyright © Millisecond Software, LLC

Background

This script implements a constant stimuli procedure using Random Dot Motion (RDM) (aka Random Dot Kinematograms, RDK) It was originally pogrammed for the lab of Dr. Aaron Seitz for a validation study conducted by Kimia Yaghoubi in INQUISIT6.

This script runs a constant stimuli 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. It was originally pogrammed for the lab of Dr. Aaron Seitz for a validation study conducted by Kimia Yaghoubi in INQUISIT6. Yaghoubi et al. (2022) found that the Inquisit RDK displays produced results consistent with traditional laboratory-based MATLAB/Psychtoolbox systems. Their study showed high inter-platform reliability and similar psychometric functions, suggesting the web-enabled RDM is a reliable tool for remote perception research.

IMPORTANT: This Inquisit7 script uses a different mode to display the random dots than the original Inquisit6 "iqx" script programmed for the comparison study (Yaghoubi et al, 2022): the RDK displays in this script 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

Yaghoubi, K. C., Kabbara, S., Arian, S., Kobaissi, H., Peters, M. A. K., & Seitz, A. R. (2022). Comparing random dot motion in MATLAB vs. Inquisit Millisecond. Frontiers in Psychology, 13, 1035518–1035518. https://doi.org/10.3389/fpsyg.2022.1035518

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

12 minutes

Procedure

This helper script implements a constant stimuli procedure. The main procedure runs 160 trials each
(160 trials = 1 run).

1 block: runs 80 trials (repeated twice per run)
runs 10 coherence values x 4 direction angles x 2 stim durations (order randomly determined)

Trial Sequence:
- Fixation Dot 250ms
- stimulus Display (200ms vs. 800ms)
- responseDelay (500ms)
- response Display (max. 4000ms): valid response is a mouse click on the display
(if selected angle is within 22.5degress of the directional angle, the response is
scored as correct)
- iti (400ms)

the first trial in each block presents a 'dummy' trial to 'warm' up the html display for the
actual test trials.

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:

- selected 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

- number of dots: 100 (values.numberOfDots piped into "jspsych-rdk.js")

Directional cross
The directional cross is generated by two rectangles rotated by the directional angle
with an invisible (gray) rectangle to cover the cross section.

Instructions

provided by Kimia Yaghoubi

Summary Data

File Name: rdkt_constantstimuli_dynamicdots_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
Summary Performance Metrics (Not Part Of Yaghoubi Et Al, 2022)
propCorrectC1D200 Proportion correct responses for coherence1 (0.02) presented for 200ms
propCorrectC2D200 Proportion correct responses for coherence1 (0.04) presented for 200ms
propCorrectC3D200 Proportion correct responses for coherence1 (0.06) presented for 200ms
propCorrectC4D200 Proportion correct responses for coherence1 (0.08) presented for 200ms
propCorrectC5D200 Proportion correct responses for coherence1 (0.1 presented for 200ms
propCorrectC6D200 Proportion correct responses for coherence1 (0.15) presented for 200ms
propCorrectC7D200 Proportion correct responses for coherence1 (0.2) presented for 200ms
propCorrectC8D200 Proportion correct responses for coherence1 (0.25) presented for 200ms
propCorrectC9D200 Proportion correct responses for coherence1 (0.3) presented for 200ms
propCorrectC10D200 Proportion correct responses for coherence1 (0.5) presented for 200ms
propCorrectC1D800 Proportion correct responses for coherence1 (0.02) presented for 800ms
propCorrectC2D800 Proportion correct responses for coherence1 (0.04) presented for 800ms
propCorrectC3D800 Proportion correct responses for coherence1 (0.06) presented for 800ms
propCorrectC4D800 Proportion correct responses for coherence1 (0.08) presented for 800ms
propCorrectC5D800 Proportion correct responses for coherence1 (0.1 presented for 800ms
propCorrectC6D800 Proportion correct responses for coherence1 (0.15) presented for 800ms
propCorrectC7D800 Proportion correct responses for coherence1 (0.2) presented for 800ms
propCorrectC8D800 Proportion correct responses for coherence1 (0.25) presented for 800ms
propCorrectC9D800 Proportion correct responses for coherence1 (0.3) presented for 800ms
propCorrectC10D800 Proportion correct responses for coherence1 (0.5) presented for 800ms
noNegativeSlope200 Compares each consecutive pairs of slopes for 200ms duration trials
true: consecutive proportion corrects increase from the lowest (0.02) to the largest coherence value (1.5)
false: there is at least one proportion correct that does not increase compared to the previous value
If expressions.NoNegativeSlope200 is evaluated to being false, the threshold is not determined
by the script algorithm. The raw data might need to be re-evaluated manually.
diffThreshold200 Determines the Difference Threshold for 200ms trials (if for some reason the implemented algorithm cannot calculate
a threshold, the data will read "not determined". The raw data might need to be re-evaluated manually).
Implemented Algorithm
Underlying idea: Difference threshold is at the point where participant gets the movement response correct 50% of the times
The algorithm estimates the threshold at "50% correct" by linear interpolation.
noNegativeSlope800 Same as for the 200ms trials
diffThreshold800 Same as for the 200ms trials

Raw Data

File Name: rdkt_constantstimuli_dynamicdots_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
display.canvasHeight, display.canvasWidth The pixel width and height of the active canvas used on the current computer
display.refreshrate, display.refreshInterval: refreshrate and interval of the current monitor (see also values.dotposition)
subject Participant ID
session Session number
run The current run number
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
numberOfDots Sets the total number of dots on the screen (MAX: 100)
dotSize The relative diameter of the dots (relative to canvas height which is 100%)
speed Calculated as %screen height displacement per 'frame'
blockCounterPerRun Blockcounter (there should be blocks for each run = 160 trials)
test "dummy": first trial in a block to 'warm up the rdk display'
"test": actual test trial
trialCounter Counts the trials (max: 160) run
Ivs
coherence The currently selected coherence
angle The currently selected angle (rotation is COUNTERclockwise)
stimDuration The currently selected stim duration
corrQuadrant The screen quadrant of the correct response coordinates (countercounterclockwise)
top: 1 (right: angles 360/0-89), 2 (left: angles 90-179)
bottom: 3 (left: angles 180-269), 4 (right: angles 270-359)
Dvs
responseCoordinatesQuadrant The screen quadrant of the given response coordinates
response The participant's response (here: selection of correctAxis vs. incorrectAxis)
responseX, responseY The pixel responses for the vertical (y) and horizontal (x) coordinates on the active canvas
responseAngleDegrees The calculated response angle ( 0degrees is W->E, COUNTERclockwise)
angleDiff The difference between response angle and direction angle
correct 1 = correct; 0 = error
a response is correct if expressions.angleDiff is < 22.5
latency The response latency (in ms)

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
Sizing Parameters
fixationSize The relative size of the fixation stim (relative to canvas height)3%
Trial Timing Parameters
iti The intertrial interval (in ms): shows the red dot400
fixationDuration The duration (in ms) of the fixation stim (the white dot)250
responseDelay The duration (in m) of the blank phase after dot display presentation and response trial500
maxResponseDuration The max. duration (in ms) of the response trial4000
feedbackDuration The feedback duration (in ms)500
Stim Durations
stimDuration1 Stim duration 1 (in ms)200
stimDuration2 Stim duration 2 (in ms)800
Coherence Values
coherence1 Tested coherence value 10.02
coherence2 Tested coherence value 20.04
coherence3 Tested coherence value 30.06
coherence4 Tested coherence value 40.08
coherence5 Tested coherence value 50.1
coherence6 Tested coherence value 60.15
coherence7 Tested coherence value 70.2
coherence8 Tested coherence value 80.25
coherence9 Tested coherence value 90.3
coherence10 Tested coherence value 100.5
Angle-Direction Values
angle1 Tested direction angle 145
angle2 Tested direction angle 2135
angle3 Tested direction angle 3225
angle4 Tested direction angle 4315
Experimental Design Parameters
blockRepeatsPerRun Repeats the block (80 trials) twice per run2
Response Leniency
maxAngleDiff The max. difference btw. response angle and direction angle that is considered to be correct22.5