User Manual: Inquisit Mirror Tracing Test


___________________________________________________________________________________________________________________	

								*Mirror Tracing Task*
___________________________________________________________________________________________________________________	

Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC
Date: 05-27-2022
last updated:  10-01-2024 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC

Script Copyright © 10-01-2024 Millisecond Software


___________________________________________________________________________________________________________________
BACKGROUND INFO 	
___________________________________________________________________________________________________________________
This script implements Millisecond Software's version of a computerized Mirror Tracing Task (e.g. Starch, 1910), 
a measure of hand eye coordination and novel motor learning. In general, mirror tracing tasks
ask participants to trace various shapes while only being able to see its mirror image.

Researchers can select to run the task with an absolute screen size to ensure that distances
stay the same across devices. The default sizing settings are optimized for ipad touchscreens.
See section Editable Parameters for more info.

The setup of this script was inspired by the Mirror Tracing Task described by the Pittsburgh Stress Battery.
It uses a square and a circle to trace.

References:
//Pittsburgh Stress Battery:
https://measures.scienceofbehaviorchange.org/measuredetails/4deff805-0b33-4b0d-b1b8-5611ea8534e5
Author: Eric Loucks

//General References for Mirror Tracing:
Starch, D. (1910). A demonstration of the trial and error method of learning. 
Psychological Bulletin, 7, 20-23. 

Borresen, C. R. (1973). Reward, Punishment and Reversal on a Mirror-Tracing Task. 
Perceptual and Motor Skills, 37(1), 199–202. 
https://doi.org/10.2466/pms.1973.37.1.199

Julius, M. S., & Adi-Japha, E. (2016). A Developmental Perspective in Learning the Mirror-Drawing Task. 
Frontiers in Human Neuroscience, 10, 83–83. 
https://doi.org/10.3389/fnhum.2016.00083								

___________________________________________________________________________________________________________________
TASK DESCRIPTION	
___________________________________________________________________________________________________________________

The screen is divided into a mirror part (on top) and a drawing canvas (on the bottom).
Participants will be asked to trace a shape (square and/or circle) on the drawing canvas (bottom) but can only 
see their tracing trail on the mirror image of the shape (on the top). 
By default, each tracing trial lasts at most 45s (editable parameter) before it is timed out.
___________________________________________________________________________________________________________________	
DURATION 
___________________________________________________________________________________________________________________	
the default set-up of this script takes appr. 7-8 minutes to complete

___________________________________________________________________________________________________________________	
DATA OUTPUT DICTIONARY
___________________________________________________________________________________________________________________
The fields in the data files are:

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

/*Parameter Settings*/																				
tracingMechanism:					"finger" vs. "mouse" vs. "stylus"
tracingHand:						"dominant" vs. "nondominant" vs. "left" vs. "right"
runTracingCircle, 					true (1) or false (0)
runTracingSquare:					true (1) or false (0)


//Play Setup: parameter
runAbsoluteSizes:					true (1) = should run absolutely sized canvas (see canvasHeightMM)
									false (0) = should use proportionally sized canvas (uses width = 4/3*screenHeight)
								
canvasAdjustments:					N/A: not applicable => runAbsoluteSize was set to 'false'
									0: runAbsoluteSize was set to 'true' and screen size was large enough
									1: runAbsoluteSize was set to 'true' BUT screen size was too small and 
									adjustments had to be made
									
//UI data:									

display.canvasHeight:				the height of the active canvas ('activeCanvas') on the current monitor in pixels
display.canvasWidth:				the width of the active canvas ('activeCanvas') on the current monitor in pixels

pxPerMM:							the conversion factor to convert pixel data into mm-results for the current monitor
									(Note: the higher resolution of the current monitor 
									the more pixels cover the same absolute screen distance)	
									This factor is needed if you want to convert pixel data into absolute mm data									

activeCanvasHeightMM:				the width of the play area in mm 
activeCanvasWidthMM:					the height of the play area in mm 										
																				
tracingCircleDiameterMM:			the diameter of the tracing circle in mm
tracingSquareHeightMM:				the diameter of the tracing square in mm
trackWidthMM:						the width of the tracks around the stimulus in mm (the area that is considered 'on track')

//raw data: trial by trial
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.
										
									
blockCounter:						counts the number of blocks run per condition									
tracingStimCondition:				1 = circle; 2 = square 
trialCounter:						trial counter per block

success:							in trial.tracingCircle_tracing_end/trial.tracingSquare_tracing_end
									1 = participant reached goal area
									0 = trial was timed out (or ended prematurely)
									
countSuccess:						counts the number of successfule trials per block

ontrack:							1 = the current mouse coordinates are on the track around the circle/square

errorPX:							for coordinates 'ontrack' -> 0
									if not on track: the number of pixels that finger/mouse is currently away from track
									negative values: the finger/mouse went inside the tracing stimulus ('inside error')
									positive values: the finger/mouse went outside the tracing stimulus ('outside error')
									
									CIRCLE condition:
									'inside error': the (negative) pixel difference btw. inner track radius (in px) and distance from mouse coordinates to circle center
									'outside error': the (positive) pixel difference btw. outer track radius (in px) and distance from mouse coordinates to circle center
									=> see expressions.TracingCircle_errorPX

									Square condition:
									'inside error': script returns the minimum of 4 possible distances to the inner track (Note: 'benefit of a doubt' coding)
									1. vertical distance to top inner track
									2. vertical distance to bottom inner track
									3. horizontal distance to left inner track
									4. horizontal distance to right inner track
									'outside error': script determines in which of 8 possible locations (relative to the tracing square) the coordinates fall into
									1. directly above: returns the difference in y coordinates of the outer track and the mouse coordinates
									2. directly below: returns the difference in y coordinates of the outer track and the mouse coordinates
									3. directly left: returns the difference in x coordinates of the outer track and the mouse coordinates
									4. directly left: returns the difference in x coordinates of the outer track and the mouse coordinates
									the remaining locations return the distance of the mouse coordinates to the nearest corner of the outer track
									=> see expressions.TracingSquare_errorPX
									
errorXPX:							the horizontal x mouse/finger coordinate at time of error									
errorYPX:							the vertical y mouse/finger coordinate at time of error

meanTrialErrorPX:					the mean of all 'errorPX' values across the trial (measure only is based on absolute values => of interest is the absolute distance) in the current trial
									calculated at the end of each trial

onTargetZone:						1 = mouse/finger coordinates are currently on the Target Zone; 0 = otherwise 
leftTargetZone:						1 = mouse/finger coordinates have moved on from initial touchdown on Target Zone; 0 = otherwise
reachedTargetZone:					1 = mouse/finger coordinates have reached Target Zone again after once leaving it; 0 = otherwise 


//ontrack proportion
expressions.propOnTrack;

//built-in DVs:
response, correct, latency, 
									
//Latency:
tracingRT:							the cumulative tracing Response Time

//Coordinate Measures
mouse.x:							the x coordinate of the finger at the time of the currently measured response (in pixel)
mouse.y:							the y coordinate of the finger at the time of the currently measured response (in pixel)
mirrorX:							the mirrored x-coordinate (in pixel)
mirrorY:							the mirrored y-coordinate (in pixel)

targetZoneCenterXPX:			the horizontal x-pixel position of the target/start circle
targetZoneCenterYPX:			the vertical y-pixel position of the target/start circle
targetZoneDiameterPX:			the pixel diameter of the target/start circle


//Inquisit built-in variables
response:							the response of participant
									Example:
									'mousemove' => mouse coordinate change was noted
									or the name of the stimulus that was touched

correct:							correctness of response

latency:							measured from: onset trial until recorded response
									

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

/*Parameter Settings*/										
tracingMechanism:					"finger" vs. "stylus" vs. "mouse"
tracingHand:						"dominant" vs. "nondominant" vs. "left" vs. "right"
runTracingCircle, 					true (1) or false (0)
runTracingSquare:					true (1) or false (0)

//Play Setup:
/runAbsoluteSizes:					true (1) = should run absolutely sized canvas (see canvasHeightMM)
									false (0) = should use proportionally sized canvas (uses width = 4/3*screenHeight)
								
/canvasAdjustments:					N/A: not applicable => runAbsoluteSize was set to 'false'
									0: runAbsoluteSize was set to 'true' and screen size was large enough
									1: runAbsoluteSize was set to 'true' BUT screen size was too small and 
									adjustments had to be made

display.canvasHeight:				the height of the active canvas ('activeCanvas') on the current monitor in pixels
display.canvasWidth:				the width of the active canvas ('activeCanvas') on the current monitor in pixels

pxPerMM:							the conversion factor to convert pixel data into mm-results for the current monitor
									(Note: the higher resolution of the current monitor 
									the more pixels cover the same absolute screen distance)
									This factor is needed if you want to convert pixel data into absolute mm data
									to compare error distances across screens

/activeCanvasHeightMM:				the width of the play area in mm 
/activeCanvasWidthMM:				the height of the play area in mm 

tracingCircleDiameterMM:			the diameter of the tracing circle in mm
tracingSquareHeightMM:				the diameter of the tracing square in mm
trackWidthMM:						the width of the tracks around the stimulus in mm (the area that is considered 'on track')
										

trialCounterCircle:					the number of trials run in the circle conditions
countSuccessCircle: 				the number of successful trials run in the circle condition
									success = participant reached the goal area (was not timed out)
									
trialCounterSquare:					the number of trials run in the square conditions
countSuccessSquare: 				the number of successful trials run in the square condition
									success = participant reached the goal area (was not timed out)

//the remaining data is only calculated for 'successful' trials:
									
//Latency Data//
meanRT: 					mean tracing RT (in ms) across stim conditions
meanRTCircle: 				mean tracing RT (in ms) for circle condition trial	
meanRTSquare: 				mean RT (in ms) for square condition trials

//Pixel Error Data
meanPixelError:			mean pixel errors across stim conditions
meanPixelErrorCircle:		mean pixel errors in circle condition 
meanPixelErrorSquare:		mean pixel errors in square condition
(see 'errorPX' - under raw data- for explanation of how pixel errors were computed in this script)
												
___________________________________________________________________________________________________________________	
EXPERIMENTAL SET-UP 
___________________________________________________________________________________________________________________	
By default, this script runs 2 tracing stimuli (circle, square) in a blocked design with 5 trials each.
Each trial lasts at most 45s (Editable Parameter) before it is timed out. 
After the first block, participants get the chance to take a break (self-paced).
By default, participants receive optional performance feedback at script conclusion.

Check section 'Editable Parameters' for parameters that control
- tracing stimuli (circle/square) conditions to run
- trial numbers
- trial timeouts
- performance feedback settings
etc.
___________________________________________________________________________________________________________________	
INSTRUCTIONS 
___________________________________________________________________________________________________________________

provided by Millisecond Software - can be edited under section 'Editable Instructions'.
___________________________________________________________________________________________________________________	
EDITABLE CODE 
___________________________________________________________________________________________________________________	
check below for (relatively) easily editable parameters, stimuli, intro1 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: