User Manual for Inquisit's Change Detection Task


___________________________________________________________________________________________________________________	

											Detection test
							- simple reaction time task for the touchscreen-
___________________________________________________________________________________________________________________	


Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-26-2022
last updated:  05-03-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 05-03-2022 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements a simple reaction time ('detection task') to measure psychomotor function.
The task uses playing cards as targets and is developed for touchscreens but will adapt to 
mouse use on non-touchscreens.

Researchers can select to run the task with an absolute screen size to ensure that distances
stay the same across devices. The default settings are optimized for ipad touchscreens.
See section Editable Parameters for more info.


/////References for similar Detection Tasks:////

Maruff P, Thomas E, Cysique L, Brew B, Collie A, Snyder P, Pietrzak RH. Validity of the CogState brief battery: 
relationship to standardized tests and sensitivity to cognitive impairment in mild traumatic brain injury, 
schizophrenia, and AIDS dementia complex. Arch Clin Neuropsychol. 
2009 Mar;24(2):165-78. doi: 10.1093/arclin/acp010. Epub 2009 Mar 25. PMID: 19395350.
											
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	

Participants get presented with a deck of joker cards  and the cards will be turned over one by one
with randomly selected delays. 
Once a joker card is turned over, participants are instructed to press a YES response button as quickly as possible.
Once the response is made, an animation is started that 'returns' the card back to the stack.
The next trial is initiated once participants press a 'Home Button'. The 'Home Button' is implemented
to ensure that response fingers are roughly equally distanced from the YES response button for each trial.
__________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of the script takes appr. 3 minutes to complete

___________________________________________________________________________________________________________________	
DATA FILE INFORMATION 
___________________________________________________________________________________________________________________	
The default data stored in the data files are:

(1) Raw data file: 'detectiontask_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)
date, time: 					date and time script was run 
subject, group, 				with the current subject/groupnumber
session:						with the current session id
									
blockCounter:					the total number of experimental blocks run
trialCounter:					counts the target and nontarget trials per block (Note: start trials are excluded from count)

//Play Setup:
(parameter) runAbsoluteSizes:	true (1) = should run absolutely sized canvas (see parameters- canvasHeight_inmm)
								false (0) = should use proportionally sized canvas (uses width = 43*screenHeight)
								
canvasAdjustments:				NA: not applicable => parameters- runAbsoluteSize was set to 'false'
								0: parameters- runAbsoluteSize was set to 'true' and screen size was large enough
								1: parameters- runAbsoluteSize was set to 'true' BUT screen size was too small and 
								adjustments had to be made

playareaHeight_inmm:			the width of the play area in mm 
playareaWidth_inmm:				the height of the play area in mm 
display.canvasheight:			the height of the active canvas ('playarea') in pixels
display.canvaswidth:			the width of the active canvas ('playarea') in pixels

px_per_mm:						the conversion factor to convert pixel data into mm-results for the current monitor
								(Note: the higher resolution of the current monitor 
								the more pixels cover the same absolute screen distance)
								This factor is needed if you want to convert pixel data into absolute mm data or the other way around
								
distance_homeButton_responsebutton_inmm:	the calculated distance (in mm) between center of homeButton and center of one of the response buttons 																														

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 such as feedback trials. Thus, trialnum 
									may not reflect the number of main trials run per block. 

//DVs:
response:						the Response of the participant

correct:						the correctness of the response (1 = correct; 0 = otherwise)

latency:						how fast a participant responded within the given timeframe, if at all (in ms)
								no responses = the entire trialduration
									
									
(2) Summary data file: 'detectiontask_raw*.iqdat' (a separate file for each participant)

inquisit.version:				Inquisit version run
computer.platform:				the platform the script was run on (win/mac/ios/android)
startdate:						date script was run
starttime:						time script was started
subjectid:						assigned subject id number
groupid:						assigned group id number
sessionid:						assigned session id number
elapsedtime:					time it took to run script (in ms); measured from onset to offset of script
completed:						0 = script was not completed (prematurely aborted); 
								1 = script was completed (all conditions run)
								
//Play Setup:
(parameter) runAbsoluteSizes:	true (1) = should run absolutely sized canvas (see parameters- canvasHeight_inmm)
								false (0) = should use proportionally sized canvas (uses width = 43*screenHeight)
								
canvasAdjustments:				NA: not applicable => parameters- runAbsoluteSize was set to 'false'
								0: parameters- runAbsoluteSize was set to 'true' and screen size was large enough
								1: parameters- runAbsoluteSize was set to 'true' BUT screen size was too small and 
								adjustments had to be made

playareaHeight_inmm:			the width of the play area in mm 
playareaWidth_inmm:				the height of the play area in mm 
display.canvasheight:			the height of the active canvas ('playarea') in pixels
display.canvaswidth:			the width of the active canvas ('playarea') in pixels

px_per_mm:						the conversion factor to convert pixel data into mm-results for the current monitor
								(Note: the higher resolution of the current monitor 
								the more pixels cover the same absolute screen distance)
								This factor is needed if you want to convert pixel data into absolute mm data or the other way around
								
distance_homeButton_responsebutton_inmm:	the calculated distance (in mm) between center of homeButton and center of one of the response buttons 																														
																
//Parameter Settings:								
blocks_pertest:					number of test blocks run
trials_perblock:				number of trials per block to run  

//reaction time data (response time measured relative to target onset)
meanRT:							mean response time (in ms) 
SD_RT:							standard deviation of response times (in ms) 
medianRT:						median response time (in ms)
minRT:							minimum response time (in ms)
maxRT:							maximum response time (in ms)

//delay data
meanDelay:						mean delay time (in ms) 
SD_Delay:						standard deviation of delay times (in ms) 
medianDelay:					median delay time (in ms)
minDelay:						minimum delay time (in ms)
maxDelay:						maximum delay time (in ms)																					
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

Test: by default this script runs 1 testblock (Editable Parameter) with 35 trials each (Editable Parameter) 
using the same joker card for every trial. The script provides a brief resttrial (self-paced) after each block.
The script randomly samples a joker delay from 500-5000ms (Editable Parameter)

Trial Information:
-> each trial starts with a HomeButton press (reminder presented after 2s)
-> pressing the home button starts the delay period
(if the home button is released during this time for more than 250ms, participants
are asked to return to the home button and a new iti is randomly selected)
-> after the delay period is over, the joker card is turned over, 
and the script waits for response (there is no time limit for making a response)
-> card animation for 1000ms
(if the home button is pressed at the end of the card animation, the next trial starts immediately
with the delay period)

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________
see section Editable Stimuli

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	
provided by Millisecond Software - can be edited under section Editable Instructions

___________________________________________________________________________________________________________________	
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: