Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com), Millisecond
Millisecond thanks Dr. Aaron Seitz for his generous help with Random Dot Motion Displays!
Created: January 10, 2021
Last Modified: January 13, 2025 by K. Borchert (katjab@millisecond.com), Millisecond
Script Copyright © Millisecond Software, LLC
This script runs a double staircase procedure to find coherence thresholds for random moving dot displays. Some parameters can be selected during runtime.
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).
STAIRCASE PROCEDURE:
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
=> 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.
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).
7 minutes
File Name: staircaseRdktMainDynamicdotsSummary*.iqdat
| Name | Description |
|---|---|
| inquisit.version | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| 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 |
| 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 |
File Name: staircaseRdktMainDynamicdotsRaw*.iqdat
| Name | Description |
|---|---|
| build | Inquisit version number |
| computer.platform | Device platform: win | mac |ios | android |
| date | Date the session was run |
| time | Time the session was run |
| subject, group, | With the current subject/groupnumber |
| session | Session 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 |
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 |