User Manual for Inquisit's Spatial Delayed Response Task

						
___________________________________________________________________________________________________________________	

							*Spatial Delayed Response Task (SDRT)*
___________________________________________________________________________________________________________________	

Script Author: Dave Nitz (dave@millisecond.com) for Millisecond Software, LLC
last updated:  02-28-2022 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 02-28-2022 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	
This script implements the Spatial Delayed Response Task (SDRT) using short
and long delays to test memory of spatial locations

The implemented procedure is based on:

	Lyons-Warren, A., Rema, L., & Hershey, T. (2004). Short- and long-term spatial delayed
	response performance across the lifespan. Developmental Neuropsychology, 26(3), 661–678.
	

Note: The Spatial Delayed Response Task (SDRT) requires stimulus sizes, positions as well as subjects'
pointing errors to be measured in millimeters. 
This script automatically 
a) checks that the current display is big enough to run this task 
b) calculates a 'pixel/mm' ratio for the current display and uses that
ratio to size the stimuli accordingly
	
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	
A small dot briefly flashes on the screen in one of 32 screen locations.
The primary task is to recall the position of the dot after a delay period
that introduces a non-memory "distractor" task that interferes with rehearsal: 
for different delay periods a series of geometric shapes appear in the center of the screen for one
second each. Participant are asked to press the space bar whenever they see the 
diamond shape ("go trial").  
After the delay period is over, the mouse cursor appears as a dot and participants are asked move the dot to
the screen position where they remember the small dot to have appeared.	Once at the position,
participants are asked to click the mouse*.
In 1/3 of all trials the dot appears in the exact position that the cue appeared in (cue trial).	

* in Lyons-Warren et al (2004) participants pointed to the location and the experimenter placed the dot							  
											  

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

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

(1) Raw data file: 'spatialdelayedresponsetask_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

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.	

																			
trialcount						Global trial count. Separate counts for practice and test blocks.
trialtype						Type of current trial. cue -> cue-present trial ; nocue -> uncued (experimental) trial
delaycondition					Delay condition of current trial (5000, 60000 or 120000).

delaycountdown					Remaining delay during CPT trials.
picture.cptstim.currentitem:

Response:						the participant's response
								57 = spacebar press
									
correct:						the correctness of the response (1 = correct; 0 = incorrect)
latency: 						the response latency (in ms)

tstart							Start time of pointing phase.
tend							End time of pointing phase.
pointlatency					Pointing latency (in ms) computed from difference between 'tend' and 'tstart'.

angle							Current position of the cue stimulus in degrees around a circle.
								Angles proceed clockwise from the 12:00 position in 10 degree
								intervals. Exact horizontal and vertical positions are excluded 
								(0,90,180 and 270 degrees).
									
cuex							x coordinate of cue.
cuey							y coordinate of cue.
pointx							x coordinate of pointing location.
pointy							y coordinate of pointing location.

error_inpx						Returns the current pointing error in pixels.
error_inmm						Returns the current pointing error in millimeters.

valid							Returns whether the current trial was marked 'invalid' or 'valid'
								0 -> invalid
								1 -> valid
									
n_cue_total						Total count of cue-present trials.
n_cue_valid						Number of cue-present trials marked as valid.
sumerror_cue					Sum of pointing error (in mm) across all valid cue-present trials.
sserror_cue						Squared sum of error across all valid cue-present trials.
merror_cue						Mean pointing error (in mm) for cue-present trials.
sderror_cue						Standard deviation of pointing error for cue-present trials.

n_5_total						Total count of 5sec delay trials.
n_5_valid						Number of 5sec delay trials markes as valid.
sumerror_5						Sum of pointing error (in mm) across all valid 5sec delay trials.
sserror_5						Squared sum of error across all valid 5sec delay trials.
merror_5						Mean pointing error (in mm) for 5sec delay trials.
sderror_5						Standard deviation of pointing error for 5sec delay trials.

n_60_total						Total count of 60sec delay trials.
n_60_valid						Number of 60sec delay trials markes as valid.
sumerror_60						Sum of pointing error (in mm) across all valid 60sec delay trials.
sserror_60						Squared sum of error across all valid 60sec delay trials.
merror_60						Mean pointing error (in mm) for 60sec delay trials.
sderror_60						Standard deviation of pointing error for 60sec delay trials.

n_120_total						Total count of 120sec delay trials.
n_120_valid						Number of 120sec delay trials markes as valid.
sumerror_120					Sum of pointing error (in mm) across all valid 120sec delay trials.
sserror_120						Squared sum of error across all valid 120sec delay trials.
merror_120						Mean pointing error (in mm) for 120sec delay trials.
sderror_120						Standard deviation of pointing error for 120sec delay trials.

n_cpt_current					Number of CPT trials run in the current trial.
cpterrors_current				Number of CPT errors in the current trial.
n_cpt_total						Total number of CPT trials run. Separate counts for practice and test blocks.
cpterrors_total					Total number CPT errors across the whole task. Separate counts for practice and test blocks.

(2) Summary data file: 'spatialdelayedresponsetask_summary*.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)

n_cue_total						Total count of cue-present trials.
n_cue_valid						Number of cue-present trials marked as valid.
sumerror_cue					Sum of pointing error (in mm) across all valid cue-present trials.
sserror_cue						Squared sum of error across all valid cue-present trials.
merror_cue						Mean pointing error (in mm) for cue-present trials.
sderror_cue						Standard deviation of pointing error for cue-present trials.

n_5_total						Total count of 5sec delay trials.
n_5_valid						Number of 5sec delay trials markes as valid.
sumerror_5						Sum of pointing error (in mm) across all valid 5sec delay trials.
sserror_5						Squared sum of error across all valid 5sec delay trials.
merror_5						Mean pointing error (in mm) for 5sec delay trials.
sderror_5						Standard deviation of pointing error for 5sec delay trials.

n_60_total						Total count of 60sec delay trials.
n_60_valid						Number of 60sec delay trials markes as valid.
sumerror_60						Sum of pointing error (in mm) across all valid 60sec delay trials.
sserror_60						Squared sum of error across all valid 60sec delay trials.
merror_60						Mean pointing error (in mm) for 60sec delay trials.
sderror_60						Standard deviation of pointing error for 60sec delay trials.

n_120_total						Total count of 120sec delay trials.
n_120_valid						Number of 120sec delay trials markes as valid.
sumerror_120					Sum of pointing error (in mm) across all valid 120sec delay trials.
sserror_120						Squared sum of error across all valid 120sec delay trials.
merror_120						Mean pointing error (in mm) for 120sec delay trials.
sderror_120						Standard deviation of pointing error for 120sec delay trials.

n_cpt_current					Number of CPT trials run in the current trial.
cpterrors_current				Number of CPT errors in the current trial.
n_cpt_total						Total number of CPT trials run. Separate counts for practice and test blocks.
cpterrors_total					Total number CPT errors across the whole task. Separate counts for practice and test blocks.

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

3 blocks:
1. Screen calibration to size the stimuli for the current monitor
2. Practice: 4 practice trials (default)
3. Test: 
	* 24 nocue trials (cursor dot appears by itself)
		* 8 nocue trials present the memory test (pointing trial) after a delay (CPT task) of 5000ms
		* 8 nocue trials present the memory test (pointing trial) after a delay (CPT task) of 60000ms
		* 8 nocue trials present the memory test (pointing trial) after a delay (CPT task) of 120000ms
	* 8 cue trials (together with the cursor dot, the original dot appears in the exact position that it appeared in before)
		* all 8 cue trials present the memory test (pointing trial) after a delay (CPT task) of 5000ms
		
* CPT task: stimuli are selected randomly with replacement for the duration of the selected memory delay


Note: The Spatial Delayed Response Task (SDRT) requires stimulus sizes, positions as well as subjects'
pointing errors to be measured in millimeters. 
This script automatically 
a) checks that the current display is big enough to run this task 
b) calculates a 'pixel/mm' ratio for the current display and uses that
ratio to size the stimuli accordingly
	
___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________	
see section Editable Stimuli

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________	

Instructions are not original to the task. They are provided by Millisecond Software
as htm/html pages and simple page elements and can be edited either by changing
the provided htm/html files or directly under Editable Instructions.
To edit htm/html-files: open the respective documents in simple Text Editors such as TextEdit (Mac)
or Notepad (Windows).

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

Absolute Stimulus Sizing:

	cuesize_inmm			Size of the cue stimulus in millimeters. This value is converted to
							pixel dimensions.
							Default is 6.5mm.
							
							Note: Lyons-Warren et al (2004) used 10mm
							
	stimsize_inmm			Size of the CPT stimuli in millimeters. This value is converted to
							pixel dimensions.
							Default is 20mm.
							
							
	radius_inmm				Circle's radius (where cue can be located) in millimeters. 
							This value is converted to pixel dimensions
							Default is 60mm.
							
							Note: Lyons-Warren et al (2004) possibly used 95mm (the article states 950mm which looks like a printing error)						
							
							
Duration Parameters:							
							
	dur_precue_min			Minimum duration of precue delay.
	dur_precue_max			Maximum duration of precue delay.
	dur_cue					Cue presentation duration in milliseconds. Default is 150.
	dur_cpt					Duration of stimulus exposure in CPT trials. Default is 1000.
	dur_iti					Duration of the inter-trial-interval (ITI). Default is 1000.
	

Other Task Parameters:
							
	npracticetrials			Number of trials to absolve during practice. Default is 4.
	
	skippractice			Pseudo-boolean switch to en- or disable the practice block.
							0 -> run practice block
							1 -> skip practice block
							
	skiptest				Pseudo-boolean switch to en- or disable the test block.
							0 -> run test block
							1 -> skip test block