Return to the Spatial Delayed Response Task page
						
						Spatial Delayed Response Task (SDRT)
SCRIPT INFO

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

Script Copyright ©  08-15-2016 Millisecond Software


BACKGROUND INFO

											*Purpose*
	This script implements the Spatial Delayed Response Task (SDRT) described in:

	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.
	
	
	CAUTIONARY NOTE: SCREEN CALIBRATION REQUIRED:

	The Spatial Delayed Response Task (SDRT) requires stimulus sizes, positions as well as subjects'
	pointing errors to be measured in millimeters. However, there is no absolute relationship 
	between a pixel and any "real", physical measurement unit (mm, cm, inches, etc.).
	Instead, the relationship between pixel and mm is different for every display and depends on
	certain hardware properties (visible screen area, pixel density, etc.) as well as the set screen 
	resolution. The script includes a simple calibration routine which will help you figure out the 
	pixel-to-mm correspondence on your particular monitor. A standardized line will be drawn to
	the screen. Take a ruler, hold it to the screen, measure the line and enter the result in 
	millimeters. Make sure you perform the measurement as accurately as possible!
	For repeated runs on the same setup, the measurement result can also be entered directly
	into the script's source code (-> 'parameters.cal_mm'). If this value is greater than zero, the 
	calibration routine will be skipped automatically.
	However, note that you need to reactivate the calibration routine if you change your monitor's
	resolution or connect a different display.	
	

											  *Task*
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							  
											  

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:							Inquisit build
computer.platform:				the platform the script was run on
date, time, subject, group:		date and time script was run with the current subject/groupnumber 
blockcode, blocknum:			the name and number of the current block
trialcode, trialnum: 			the name and number of the currently recorded trial
									(Note: not all trials that are run might record data; by default data is collected unless /recorddata = false is set for a particular trial/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).

delaycoountdown					Remaining delay during CPT trials.
picture.cptstim.currentitem:
response:						the participant's response
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 'values.tend' and 'values.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.

errorpx							Returns the current pointing error in pixels.
errormm							Returns the current pointing error in millimeters.

valid							Returns whether the current trial was marked 'invalid' or 'valid' by the  experimenter.
									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)

script.startdate:				date script was run
script.starttime:				time script was started
script.subjectid:				subject id number
script.groupid:					group id number
script.elapsedtime:				time it took to run script (in ms)
computer.platform:				the platform the script was run on
/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) and 
	* 8 cue trials (together with the cursor dot, the original dot appears in the exact position that it appeared in before)
	
STIMULI
see section Editable Stimuli

INSTRUCTIONS
see 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:

	cal_mm					Length of the calibration line as measured in mm.
	cal_px					Length of the calibration line in pixels.
	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.
	cuesize					Size of the cue stimulus in millimeters. This value is converted to
							pixel dimensions based on calibration data by 'expressions.cuesize'.
							Default is 10mm.
	stimsize				Size of the CPT stimuli in millimeters. This value is converted to
							pixel dimensions based on calibration data by 'expressions.stimsize'.
							Default is 40mm.
	radius					Circle's radius in millimeters. This value is converted to pixel dimensions
							based on calibration data by 'expressions.radius'. Default is 95mm.
	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

Copyright © Millisecond Software. All rights reserved.
Contact | Terms of Service | Security Statement | Employment