User Manual: Inquisit Random Dot Kinematogram (RDK)


___________________________________________________________________________________________________________________	

								*DOT MOTION DISPLAY - CONSTANT STIMULI PROCEDURE*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 03-10-2021
last updated:  09-30-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 09-30-2024 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	

This helper script implements a constant stimuli procedure. It was pogrammed for the 
lab of Dr. Aaron Seitz for a validation study conducted by Kimia Yaghoubi.

Reference:

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

___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 12 minutes to complete

__________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________		
The fields in the data files are:

(1) Raw data file: 'rdkt_constantstimuli_dynamicdots_raw*.iqdat' (a separate file for each participant)*


build:								The specific Inquisit version used (the 'build') that was run
computer.platform:					the platform the script was run on (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, blockNum:				the name and number of the current block (built-in Inquisit variable)
trialCode, trialNum: 				the name and number of the currently recorded trial (built-in Inquisit variable)
										Note: 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:
numberOfDots:						sets the total number of dots on the screen (MAX: 100)
dotSize:								the relative size of the dots (relative to canvas height which is 100%)
radius:								sets the radius of the background circle relative to canvas height (Max = 50%)
speed:								calculated as %screen height displacement per 'frame'
dotPositionDuration:					the duration (in ms) that a dot stays in one position 
									(Example: 60Hz monitor has refreshinterval of 16.67ms)

blockCounterPerRun:					blockcounter (there should be blocks for each run = 160 trials)
trialCounter:						counts the trials (max: 160) run

//IVs:			 
coherence:							the currently selected coherence					 
angle:								the currently selected angle (rotation is COUNTERclockwise in this script)
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 (Note: 0degrees is W->E, COUNTERclockwise)
angleDiff:							the difference between response angle and direction angle

correct:							1 = correct; 0 = error
									Note: a response is correct if expressions.angleDiff is < 22.5

latency: 							the response latency (in ms)



//debug checks (Note: for 100 dots only):
coherenceAssignmentListsValid:			1 = position lists 2-121 all contain the adequate number of signal dots that will be assigned to the 100 dots
										0 = at least one position list does not contain the adequate number of signal dots


assignedNumberSignalDotsPerFrameValid: 	1 = across the 100 dots, each position 2-121 contains the adequat number of signal dots
										0 = at least for one position the number of signal dots was not adequat

																								
							
* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________
EXPERIMENTAL SETUP	
___________________________________________________________________________________________________________________	

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)


DEBBUGGING NOTE:
This script has a built-in debugging mode (see editable parameter.debugmode)

Purpose of debugblock:
- check that the dots move correctly given the selected direction
- check that accuracy procedure of the response works

In debugmode:
- script runs 1 block of 4 trials (each of the four directions)
- each trial presents 100 dots moving with 100% coherence in the selected direction (can be edited to a different value if needed)
- the directional cross appears
- response is simply a button down response: if it's within 22.5degrees of the selected
direction the trial is scored as correct
___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
generated by the script

DOT DISPLAYS:
Each dot (example: 100 dots) hops through max.121 positions and 
for each of those 121 positions a certain number of these 100 dots are randomly selected to be signal dots (move coherently) 
and the remaining dots are assigned to be noise dots (are randomly placed). 
The number of signal vs. noise dots per position depends on the currently tested coherence.
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 position, the same number of dots are recruited to be signal dots.

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
___________________________________________________________________________________________________________________	
EDITABLE CODE 
___________________________________________________________________________________________________________________	
check below for (relatively) easily editable parameters, stimuli, instructions etc. 
Keep in mind that you can use this script as a template and therefore always "mess" with the entire code 
to further customize your experiment.

The parameters you can change are: