Return to the Linquistic Selection Task with Mouse Tracking page
___________________________________________________________________________________________________________________	

							*Linguistic Selection Task - Mousetracking*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 04-16-2021
last updated:  04-27-2021 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 04-27-2021 Millisecond Software

Millisecond Software thanks Dr. Spivey for his generous help with this script!

___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________	

This script implements a linguistic selection mousetracking procedure based on 
Spivey et al (2005). 

Reference
Spivey, M. J., Grosjean, M., and Knoblich, G. (2005). Continuous attraction
toward phonological competitors. Proc. Natl. Acad. Sci. 102, 10393–10398
___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________	

Participants click on a STAET button at the bottom of the screen with the mouse which 
presents the two images, one in the upper left and one in the upper right corner of the screen.
A soundfile that names one of the objects is played with a 500ms delay*.
Participants are asked to click the named object as fast as possible.

Mouse coordinates are recorded every ~17ms.

*Delay: the delay was added to the procedure to maximize the chance that participants 
were already moving the mouse when soundfile was played.

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

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

(1) Raw data file: 'linguisticselectiontask_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. 
										
values.targetItemnumber:			the selected itemnumber (1-8) of the target image 

values.trialType:					1 = target1 presented with phonological similar distractor
									2 = target2 presented with phonological similar distractor
									3 = target1 presented with control item
									4 = target2 presented with control item

values.targetPosition:				1 = target is presented on the left; 2 = target is presented on the right 
									(Note: the four trials run per targetItemnumber present the target on the left and right equally often)

values.distractorCategory:			1 = distractor is a foil (phonologically similar); 2 = distractor is a control item

values.target:						stores the file name of the presented target 
values.distractor:					stores the file name of the presented distractor										
										
response:							the participant's response
correct:							accuracy of response: 1 = correct response; 0 = otherwise
latency: 							the response latency (in ms); measured from: onset of images


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

inquisit.build:						the Inquisit build/version run
computer.platform:					the platform the script was run on (win/mac/ios/android)
inquisit.build:						the version/build of Inquisit
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)
									
expressions.propCorrect:			the overall proportion correct selection rate									
expressions.meanCorrRT:				the overall mean correct response time (in ms)	

(3) Mouse tracking data file: 'linguisticselectiontask_stream*.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

display.canvasheight:			the pixel width of the active canvas
display.canvaswidth:			the pixel height of the active canvas
								
expressions.display_height_mm:	the width of the active canvas in mm 
expressions.display_width_mm:	the height of the active canvas in mm

(Note: the percentage sizes of the active canvas are by definition: 100% height, 100% width)


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
									
values.targetItemnumber:			the selected itemnumber of the target image 
values.targetPosition:				1 = target is presented on the left; 2 = target is presented on the right 
values.distractorCategory:			1 = distractor is a foil (phonologically similar); 2 = distractor is a control item

script.elapsedtime:					the measured time (in ms) elapsed since start of script (start of script = 0ms)
sound.target_soundfile.timestamp:	the timestamp (in ms) of the target soundfile
 
values.lastButtonResponse:			the last recorded response (either: start, target, distractor)	
									Note: the response of one trial ends a trial and will thus be listed under the following trial
									
									
//stimuli positions in canvas percentages
//Note: 0%-100% (from right to left), 0%-100% (from top to bottom)
expressions.startButton_x_pct,
expressions.startButton_y_pct,
expressions.startButton_height_pct,
expressions.startButton_width_pct,

expressions.target_x_pct,
expressions.target_y_pct,
expressions.target_height_pct,
expressions.target_width_pct,

expressions.distractor_x_pct,
expressions.distractor_y_pct,
expressions.distractor_height_pct,
expressions.distractor_width_pct,

//stimuli positions in canvas pixels
//Note: 
expressions.startButton_x_px,
expressions.startButton_y_px,
expressions.startButton_height_px,
expressions.startButton_width_px,

expressions.target_x_px,
expressions.target_y_px,
expressions.target_height_px,
expressions.target_width_px,

expressions.distractor_x_px,
expressions.distractor_y_px,
expressions.distractor_height_px,
expressions.distractor_width_px,

//stimuli positions in mm:
//Note: height: 0mm => top of canvas; width: 0mm => left
expressions.startButton_x_mm,
expressions.startButton_y_mm,
expressions.startButton_height_mm,
expressions.startButton_width_mm,

expressions.target_x_mm,
expressions.target_y_mm,
expressions.target_height_mm,
expressions.target_width_mm,

expressions.distractor_x_mm,
expressions.distractor_y_mm,
expressions.distractor_height_mm,
expressions.distractor_width_mm,

Mouse coordinates (in pixel, percentages and mm)
mouse.x:						the horizontal mouse coordinates in pixel 
mouse.y:						the vertical mouse coordinate in pixel 
								Note: if the mouse leaves the active canvas, you might get negative numbers		 
								
expressions.x_pct, expressions.y_pct:		positions in canvas percentages 
expressions.x_mm, expressions.y_mm:			positions in canvas mm									
						
							
* separate data files: to change to one data file for all participants (on Inquisit Lab only), go to section
"DATA" and follow further instructions

___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	

(1) Intro/Demo: one demo trial 

(2) Test: 8 item phonologically similar item pairs (e.g. candy/candle)
- each phonologically similar item pair is presented together twice (each of the objects acts as the target (foil) once)
- each item of the phonological item pair is presented with the same control item (e.g. candy-jacket; candle-jacket) once 
(in this case the phonologically similar objects are always the target)
=> 32 trials total

Note: within each item pair, the position of the target is balanced 
(=> the target object appears twice on the left and twice on the right);
the assignment of left/right is determined randomly within each item pair.

Trialsequence:

click 'start' button (in trial.start)-> 
images (target vs. distractor)-> 
target soundfile is played 500ms later -> response (Note: response can be recorded before soundfile ends playing)

___________________________________________________________________________________________________________________
STIMULI
___________________________________________________________________________________________________________________

images of phonological similar item pairs as well as corresponding soundfiles were
generously provided by Dr. Spivey.
Millisecond Software converted
- the images to .png files
- the audio files to .wav files. 
Note: audiofiles were shortened by Millisecond Software (the built-in 500ms delay was removed)

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