Return to the Visual Scanning Task page
___________________________________________________________________________________________________________________	

									      VISUAL SCANNING
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 08-26-2014
last updated:  03-12-2020 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 03-12-2020 Millisecond Software

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements a Visual Scanning Task; a visual search and recognition task designed to assess 
Perceptual Speed.

Reference:

UNIFIED TRI-SERVICE COGNITIVE PERFORMANCE ASSESSMENT BATTERY (UTC-PAB) I. DESIGN AND SPECIFICATION OF THE BATTERY. 
ENGLUND, C.E., REEVES. D.L., SHINGLEDECKER, C.A., THORNE, D.R., WILSON, K.P., & HEGGE. F.W. (1987).
REPORT NO. 87-10, NAVAL HEALTH RESEARCH CENTER, P 0 BOX 85122, SAN DIEGO, CALIFORNIA 92138
NAVAL MEDICAL RESEARCH AND DEVELOPMENT COMMAND, BETHESDA, MARYLAND (p.39)

which was inpired by:
Neisser, U. (1963). Decision time without reaction time: experiments in visual scanning. 
American Journal of Psychology, 76:d376-385.

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________
Participants are presented with a letter matrix consisting of 25 rows of 5 letters each.
The task is to read the matrix from top to bottom, left to right and find the target letter 'K'
within 10s (default) and press the Spacebar as soon as the K is found. Row numbers will appear to the 
right of each row and participants have 4s (default) to type in the row number.
Optional feedback can be provided before the next trial sequence is started.
If time limits are exceeded, the current trial sequence is terminated, a beep is played, 
and new trial sequence is started.

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

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

(1) Raw data file: 'visualscanning_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
script.sessionid:					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.
										
										
																			
values.phase:						"practice" vs. "test"
values.countblocks:					counts the number of test blocks started

stimulusitem:						presented stimuli 									
response:							the participant's response
correct:							the correctness of the response

latency: 							the response latency in ms
										Note: not all trials that are run might record data
										In this script, by default the relevant raw data is saved by trial.savetrialdata.
										Because trial.savetrialdata is the default trial to save the data for each trial sequence,
										response/correct/latency are NOT storing any useful variables by default.
										If you want to save data from each trial, go to section TRIALS and set
										/recorddata = true for each trial that should save data. 
									

values.targetcode:					contains the target box e.g. r16c3
values.correctrowdigits:			stores the correct row digit of the current trial sequence
values.input_rowdigits:				stores the complete row digit response (both digits)

values.responsecode:				stores the response code
										"correct"
										"incorrect" (input was wrong)
										"late matrix response" (participants took too long to press the spacebar)
										"late row response" (participants pressed spacebar but then took too long to input the row number)
										
values.matrix_rt:					stores the latency of the Spacebar response in ms
values.firstdigit_rt:				stores the latency of the first digit input in ms
values.seconddigit_rt:				stores the latency of the second digit input in ms

values.count_trialsstarted:			counts all trial sequences that got started by script 
									(though trial sequence might have been cut-off before any response could have been given)
									
values.count_attemptedtrials:		counts all attempted trials (across blocks); 
									attempted: values.responsecode is set to four response options
									
values.count_completedtrials:		counts all trials (across blocks) in which participants input a row number 
									(values.responsecode is either correct or incorrect)
									
values.count_latematrix:					counts how many times participant was late with Spacebar response
values.count_laterowconfirmation:			counts how many times participant was late with row number input

values.countcorrect:						counts all correct trials (across blocks)
expressions.propcorrect: 					proportion correct responses out of all attempted ones

values.remainingtasktime:					stores how much time is left for another block (updated at the end of each block)
values.max_blockduration:					stores the maximum block duration time that is still available for the current block (in ms)
values.blockstarttime:						stores the elapsed time at the start of each new block in ms


(2) Summary data file: 'visualscanning_summary*.iqdat' (a separate file for each participant)

computer.platform:					the platform the script was run on (win/mac/ios/android)
script.startdate:					date script was run
script.starttime:					time script was started
script.subjectid:					assigned subject id number
script.groupid:						assigned group id number
script.sessionid:					assigned session id number
script.elapsedtime:					time it took to run script (in ms); measured from onset to offset of script
script.completed:					0 = script was not completed (prematurely aborted); 
									1 = script was completed (all conditions run)

parameters.max_testblocks:			Maximum number of blocks to be run (e.g. 20)
values.countblocks:					counts the number of test blocks started
	
values.remainingtasktime:			stores how much time is left for another block in ms (updated at the end of each block)
										Note: test is over if either values.countblocks = parameters.max_testblocks 
										OR if values.remainingtasktime <= 0
										
values.count_trialsstarted:			counts all trial sequences that got started by script 
									(though trial sequence might have been cut-off before any response could have been given)
									
values.count_attemptedtrials:		counts all attempted trials (across test blocks)
values.count_completedtrials:		counts all trials (across test blocks) in which participants input a row number
values.count_latematrix:			counts how many times participant was late with selection response

values.countcorrect:				counts all correct trials (across test blocks)
expressions.propcorrect: 			proportion correct responses out of all attempted test trials

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
default set-up:

Practice:
- 1 block of 21 trials (Englund et al, 1987, suggest 10 -> edit parameters.nr_trainingblocks under section 'Editable Values' )

Test:
- 2 (default) blocks or max. 5 min (default), whichever comes first (editable values under section 'Editable Values')
- each block runs 21 trials (target in each of the 21 possible row locations)

Trial Sequence:
(A) trial.fixation: fixation arrow for 500ms (default)
Fixation arrow is presented one field to the left of the first matrix item (it's a preparatory time & location cue)

(B) trial.matrix: 
presents 25 rows x 5 column matrix randomly filled with all letters of the alphabet
targetletter: K (only 1 K present in matrix); position is randomly determined with the constraints that it cannot be presented in the first 3 rows and the last row (Englund et al, 1987).
10s (default) to find K 
=> press Spacebar (default) when K is found => trial.confirmation_a
=> if K is not found within time frame; a beep is played

(C) trial.confirmation_a/trial.confirmation_b 
2-digit row numbers appear to the right of each row and participant is asked to type in the 2-digit row number
(trial.confirmation_a takes in the first number; trial.confirmation_b takes in the second number) 
=> max duration: 4s (default); if confirmation is NOT given within 4 s a beep is played and a new trial is started

(D) trial.feedback/trial.beep:
-trial.feedback (optional) presents feedback regarding the performance and the location of K 
-trial.beep: presents beep if time limits were exceeded

(E) trial.savetrialdata
stores the trial data of the completely run trial sequence to the data file.

___________________________________________________________________________________________________________________	
STIMULI
___________________________________________________________________________________________________________________
the letters are presented in Courier New (a monospaced font)
Letter size can be adjusted under Editable Parameters if needed. 
Letters are white on a black background.

___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________
Instructions are based on Englund et al (1987). 

They are provided by Millisecond Software in the form of html pages
as htm/html pages and can be edited by changing the provided htm/html files.
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:

/responsekey:							the response key (default: " " -> spacebar)

/fontsize_letters:						fontsize of the letters in screen height percentages (default: 2.5%)
/fontsize_fixation:						fontsize of the fixation mark in screen height percentages (default: 3%)

/max_testblocks:						Maximum number of test blocks to be run (e.g. 2)
/nr_trainingblocks:						Number of training blocks to be run (default: 1)
											Note: Englund et al (1987) suggest to run 10 (p.43)
/max_tasktime:							Maximum duration of the task in ms (default: 300000ms => 5min)
/showfeedback:							1 = feedback is provided after 2nd digit row input
										0 = no feedback is provided
											(Note: if responses were too late a beep is played in either condition)

/fixationduration:						duration of the fixation trial in ms (default: 500ms)
/matrixduration:						maximum duration of the matrix presentation in ms (default: 10000ms => 10s)
/confirmationduration:					maximum duration allotted to input both digits of row number in ms
/posttrialduration:						time allotted between input of second digit and next fixation cross in ms
											Note: this duration is used to present (optional) feedback and the beeps