___________________________________________________________________________________________________________________ *Mirror Tracing Task* ___________________________________________________________________________________________________________________ Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software, LLC Date: 05-27-2022 last updated: 01-02-2025 by K. Borchert (katjab@millisecond.com) for Millisecond Software, LLC Script Copyright © 01-02-2025 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 setting is to use proportional sizing. Go to section Defaults for more information. 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. A five-pointed star can also be run by this script; however, pixel errors are not computed for this shape. 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. 11 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" tracingHand: "dominant" vs. "nondominant" vs. "left" vs. "right" runTracingCircle, true (1) or false (0) runTracingSquare: true (1) or false (0) runTracingStar: true (1) or false (0) 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 = square; 2 = circle; 3 = 5-pointed star 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 (includes the target zone) 0 = outside the track 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 STAR condition: error pixels reported are the converted canvas height percentage errors (see below) errorXPX: the horizontal x mouse/finger coordinate at time of error (not computed for Star) errorYPX: the vertical y mouse/finger coordinate at time of error (not computed for Star) 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 errorPct: Square/Circle: converts 'errorPX' into canvas height percentages Star: The script uses several helper Stars to locate the movement coordinates relative to the track. Error distance percentages are reported in pct canvas height percentages in increments of 1%. There are 10 outer helper stars and 10 inner helper stars. Distance: positive errors: outer errors 1%-10% => the coordinates were found on one of the outer helper stars 11% = the coordinates were an outer error outside of the 10 helper stars (max outer distance reported) negative errors: inner errors -10% to -1% => the coordinates were found on one of the inner helper stars -11% = the coordinates were an inner error outside of the 10 helper stars (max inner distance reported) meanTrialErrorPct: converts 'meanTrialErrorPX' into canvas height percentages 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: propOnTrack: proportion onTrack responses for the current trial Note: looks at the proportion of onTrackMovements relative to all Movements (excludes movements on target zone) //Latency: tracingRT: the cumulative tracing Response Time (in ms) //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."mouse" tracingHand: "dominant" vs. "nondominant" vs. "left" vs. "right" runTracingCircle, true (1) or false (0) runTracingSquare: true (1) or false (0) runTracingStar: true (1) or false (0) 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 meanPctErrorCircle: converted pixel errors into canvas height percentages meanPixelErrorSquare: mean pixel errors in square condition meanPctErrorSquare: converted pixel errors into canvas height percentages meanPixelErrorStar: mean pixel errors in star condition meanPctErrorStar: converted pixel errors back into canvas height percentages (Note: 11% is the max error pct reported for Star shapes) (see 'errorPX' - under raw data- for explanation of how pixel errors were computed in this script) ___________________________________________________________________________________________________________________ EXPERIMENTAL SET-UP ___________________________________________________________________________________________________________________ By default, this script runs 3 tracing stimuli (square, circle, 5-pointed star) in a blocked design with 5 trials each. By default, the order of the stims is randomized but can be fixed via list.blockOrder. 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/star) conditions to run - trial numbers - trial timeouts - performance feedback settings etc. Note that currently the script does not provide errorPx for the 5-pointed star condition. ___________________________________________________________________________________________________________________ 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: //color parameter / canvasColor = white //Display color of the actively used portion of the screen (the 'canvas') //Note: if set to a color other than the screencolor, the active canvas //appears 'anchored' on the screen regardless of monitor size / screenColor = black //Color of the screen not used by the canvas ('inactive screen') / defaultTextColor = black //Default color of text items presented on active canvas //CANVAS SIZING PARAMETERS //sizing Parameters in RELATIVE measurements relative to CANVAS HEIGHT //NOTE: to run the script with ABSOLUTE screen measurements, go to 'defaults' and set //canvasSize to absolute measurements / tracingCircleDiameterPct = 35% //the diameter of the circle in canvas height percentage / tracingSquareHeightPct = 35% //the height of the TracingSquare in canvas height percentage / tracingStarHeightPct = 40% //the height of the TracingStar in canvas height percentage / trackWidthPct = 1% //the width of the tracing track in canvas height percentage / tracingLineWidthPct = 1% //the width of the tracing line (drawn by participant) in canvas height percentage / targetZoneDiameterPct = 5% //the diameter of the target (also start) zone in canvas height percentage //Task Design Parameters / tracingMechanism = "mouse" //"finger" vs. "mouse" //Note: if set to 'finger' => trials will repeat if //fingers is lifted prematurely off the screen during //the tracing trials / tracingHand = "dominant" //choose from: "dominant", "non-dominant", "left", "right" / skipPerformanceFeedback = false //true: participants won't receive any performance feedback at the end //false: participants will receive performance feedback at the end / trialTimeoutMS = 45000 //the maximum time (in ms) that each tracing trial lasts //design parameters: 3 tracing stims => true: the shape is run; false = the shape is not run / runTracingSquare = true / runTracingCircle = true / runTracingStar = true / trialsPerTracingStim = 5 //number of trials per Tracing Stim block //By default, participants run 5 trials per square/circle stim