Random Dot Kinematogram - RDK

Technical Manual

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

Created: January 10, 2021

Last Modified: January 13, 2025 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This helper script implements a constant stimuli procedure using Random-Dot Kinematograms. It was originally pogrammed for the lab of Dr. Aaron Seitz for a validation study conducted by Kimia Yaghoubi in INQUISIT6.

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 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] (Note: 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

Raw Data

File Name: rdkt_constantstimuli_dynamicdots_raw*.iqdat

Data Fields

NameDescription
build Inquisit version number
computer.platform Device platform: win | mac |ios | android
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)
date, time, Date and time script was run
subject/subject With the current subject number (both built-in and custom)
session/Session With the current session id (both built-in and custom)
run The current run number
blockCode Name of the current block
blockNum Number of the current block
trialCode Name of the current trial
trialNum Number of the current trial
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 Duration Values (2)
stimDuration1 200
stimDuration2 800
Coherence Values (10)
coherence1 0.02
coherence2 0.04
coherence3 0.06
coherence4 0.08
coherence5 0.1
coherence6 0.15
coherence7 0.2
coherence8 0.25
coherence9 0.3
coherence10 0.5
Angle-Direction Values (4)
angle1 45
angle2 135
angle3 225
angle4 315
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