Return to the Visual Scanning Task (mouse input) page
___________________________________________________________________________________________________________________	

									      VISUAL SCANNING - with mouse input
___________________________________________________________________________________________________________________	

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

Script Copyright © 01-02-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 and select the target letter 'K'
within 10s (default).
Optional feedback can be provided before the next trial sequence is started.
If the time limits is exceeded, the current trial sequence is terminated, a beep is played, 
and new trial sequence is started.

Note: script VisualScanning.iqx runs the same task with keyboard input instead.

___________________________________________________________________________________________________________________	
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_mi_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. 			
										
values.phase:							"practice" vs. "test"
values.countblocks:					counts the number of test blocks started

stimulusitem

values.targetcode:					contains the target box e.g. r16c3									
response:								the participant's response (the selected box)

values.responsecode:				stores the response code
										"correct"
										"incorrect" (input was wrong)
										"late matrix response" (participants took too long select K)
										
correct:								the correctness of the response
latency: 								the response latency in ms
										
values.matrix_rt:						stores the latency of the selection response 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 selection response

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_mi_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 
=> click on K

(C) 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

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

/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)

/posttrialduration:					time allotted between letter selection and next fixation cross in ms
											Note: this duration is used to present (optional) feedback and the beeps