************************************************************************************************************** ************************************************************************************************************** APPROACH-AVOIDANCE TASK (AAT) ************************************************************************************************************** ************************************************************************************************************** SCRIPT INFO Script Author: Katja Borchert, Ph.D. (katjab@millisecond.com) for Millisecond Software LLC Date: 08-17-2012 last updated: 09-04-2014 by K. Borchert for Millisecond Software Copyright © 09-04-2014 Millisecond Software ************************************************************************************************************** ************************************************************************************************************** SCRIPT DESCRIPTION/BACKGROUND INFO ************************************************************************************************************** ************************************************************************************************************** This script implements the Approach-Avoidance Task (AAT) Paradigm as described in: Wiers, R.W., Rinck, M., Dictus, M. & Wildenberg van den, E. (2009). Relatively strong automatic appetitive action-tendencies in male carriers OPRM1 G-allele. Genes, Brain and Behavior, 8, 101-106. TASK: In Wiers et al (2009), participants were asked to do a categorization task of HOCHFORMAT vs. QUERFORMAT pictures (of 4 different categories, e.g. highcaloric, soda etc) via a joystick response. If the picture was a QUERFORMAT picture, they had to PUSH the joystick which resulted in a zooming out action: the picture shrank (AVOID). If the picture was a HOCHFORMAT picture, they had to PULL the joystick which resulted in a zooming in action: the picture enlarged (APPROACH). Pull (Approach) and Push (Avoid) responses in regard to QUERFORMAT and HOCHFORMAT formats were counterbalanced across participants. Script Specifics: EDITABLE CODE: check under EDITABLE CODE for (relatively) easily editable values, 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. If you have any questions, please don't hesitate to contact Millisecond Software. STIMULI: Wiers et al (2009): categorization of 4 types of stimuli 1) highcaloric pictures 2) color and shape matched appetitive stimuli (e.g pictures of soda bottles) 3) good pictures containing people and animals 4) bad pictures containing people and animals * 10 stimuli per category (each of these in QUERFORMAT and HOCHFORMAT format) * The stimuli used in this script are based on the original ones used. Millisecond Software thanks Dr. Wiers for generously sharing his material! Just a word of caution: the stimuli are culturally specific and may not work for your study. To substitute your own stimuli, go to EDITABLE CODE-> Editable Stimuli -> item.targets EXPERIMENT: format/direction counterbalanced by group number (odd vs even) 1. runs a trial sequence generation block 2. runs a practice block 3. runs the AAT test block TEST BLOCK: * 80 test trials (4 x 2 x 10) in a semi randomized order (see below for more info on generating the trial sequence) TEST TRIALS: * one "trial" in this script consists of a sequence of trials: 1. trial.Start: chooses next category (depends on the pregenerated trial sequence) and calls appropriate category trial 2. trial.AA1 (e.g.): selects the next stimulus from this category (here: 1) and waits for response 3. based on response either trial.increase (zoom in) or trial.decrease (zoom out) is called 4. zooming continues until the joystick is fully extended (if direction of movement is changed during zooming, the picture zooming changes (e.g. from increase to decrease). HOWEVER, the correctness of the trial is based on the initial response (push vs. pull). Furthermore, values.changedirection keeps track of whether a participant changed her response) 5. once the joystick is fully extended in one direction: trial.joystickrest is called. This trial waits until the joystick is back in rest position and then calls trial.InterstimulusInterval. NOTE: * the zooming effect can be fine-tuned via EDITABLE PARAMETERS * the default IntertrialInterval can be edited under EDITABLE PARAMETERS (no specific duration was mentioned in Wiers et al (2009), the default is set to 300ms in this script) * the joystickthreshold can be edited under DEFAULTS (to make the joystick more or less sensitive to responses). it's set to 30 by default. TRIAL SEQUENCE: Wiers et al (2009) used a semi randomized order of all 80 test stimuli with the following two constraints: 1. no more than three consecutive stimuli of the same category 2. no more than three consecutive stimuli of the same format In order to comply with these constraints, this script generates a unique trial sequence for each participant that complies with those restrictions before starting each test. !!!IMPORTANT: 1. The time to generate this sequence MAY differ across participants 2. Even if you edit the algorithm correctly to reflect changes in the number of trials/conditions, this simple algorithm may not be able to handle these changes (particularly increases in conditions and trials) go to TRIAL SEQUENCE GENERATION CODE and read the notes for alternative options. Each trial sequence contains the digits 1-4: category 1 (highcaloric related pictures) = 1 (QUERFORMAT) and 2 (HOCHFORMAT) category 2 (nonhighcaloric related pictures) = 3 (QUERFORMAT) and 4 (HOCHFORMAT) PRACTICE: * PracticeStimuli: gray rectangle in QUERFORMAT and HOCHFORMAT format * 10 trials (5 QUERFORMAT and 5 HOCHFORMAT formats in random order) * give error feedback DATA: * the data file collects accuracy of the original response (values.correct) and two types of latency responses for each main trial a) values.RT = stores how long it took to make the initial response b) values.completeRT = stores how long it took to fully extend the joystick * the data file collects values.initialresponse, values.finalresponse (when joystick is fully extended), and stores how often a participant changed her response during zooming (values.changedirection) * the data file collects preliminary AAT Difference Scores for each category (however, they are NOT corrected for accuracy and are based on values.RT - NOT on values.completeRT) INSTRUCTIONS * instructions are NOT the originals from Wiers et al (2009) * they can be edited under Instructions ********************************************************************************************************************************** ********************************************************************************************************************************** INCLUDES: this section includes helper scripts ********************************************************************************************************************************** ********************************************************************************************************************************** The following script contains code to run the sequence generator that generates the trial sequence of the AAT trials / file = "aat_sequencegenerator_neu2.iqx" ******************************************************************************************************************* ******************************************************************************************************************* EDITABLE CODE: The code in this section can be easily altered (look for additional instructions were indicated) ******************************************************************************************************************* ******************************************************************************************************************* *************************************************************************************** ********************************************* Editable Values ********************************************* *************************************************************************************** Zoom Feature: the zooming effect is achieved through trial.increase/decrease that keep calling themselves/each other until the joystick is fully extended. The amount that the picture increases/decreases depends on a) values.Startheight_ratioA/values.Startheight_ratioB (editable) b) values.MinHeight_ratio (editable) and c) how much change there was in the joystickposition in the current trial (if the joystick is gradually extended, the pictures shrinks more slowly than when the joystick is extended quickly. The endsize of the picture -when the joystick is fully extended- will therefore always be the same) /Startheight_ratioA: sets the initial size of the QUERFORMAT pictures (default ratio: 0.5 of active screenheight) /Startheight_ratioB: sets the initial size of the HOCHFORMAT pictures (default ratio: 0.6 of active screenheight) /MinHeight_ratioA: sets the the min picture height for the QUERFORMAT pictures(default: 0.05 => 5% of Maxheight_px) /MinHeight_ratioB: sets the the min picture height for the QUERFORMAT pictures(default: 0.1 => 10% of Maxheight_px) /intertrialinterval: sets the intertrialinterval for the AAT trials (default: 300ms) /totaltrialcount: the number of experimental trials (here: 80) Note: if you change the totaltrialcount, you need to change the trialcount here. However, you also might need to adjust a) list.category1 - list.category8 (EDITABLE CODE -> Editable lists) b) list.stimcats (Sequence Generation Code at the bottom) c) trials called by block.AAT (AAT EXPERIMENTAL BLOCKS) /Startheight_ratioA = 0.5 /Startheight_ratioB = 0.6 /MinHeight_ratioA = 0.05 /MinHeight_ratioB = 0.1 /intertrialinterval = 300 /totaltrialcount = 160 *************************************************************************************** ********************************************* Editable Stimuli ********************************************* *************************************************************************************** The list item.targets is organized in the following way: main category 1 (here: highcaloric) QUERFORMAT (1): indices 1-10; 21-30 main category 1 (here: highcaloric) HOCHFORMAT (2): indices 11-20; 31-40 main category 2 (here: lowcaloric) QUERFORMAT (3): indices 41-50; 51-60 main category 2 (here: lowcaloric) HOCHFORMAT (4): indices 61-70; 71-80 main category 3 (here: plant) QUERFORMAT (1): indices 81-90; 101-110 main category 3 (here: plant) HOCHFORMAT (2): indices 91-100; 111-120 main category 4 (here: animal) QUERFORMAT (3): indices 121-130; 141-150 main category 4 (here: animal) HOCHFORMAT (4): indices 131-140; 151-1600 /1 = "highcaloric_1_L.jpg" /2 = "highcaloric_2_L.jpg" /3 = "highcaloric_3_L.jpg" /4 = "highcaloric_4_L.jpg" /5 = "highcaloric_5_L.jpg" /6 = "highcaloric_6_L.jpg" /7 = "highcaloric_7_L.jpg" /8 = "highcaloric_8_L.jpg" /9 = "highcaloric_9_L.jpg" /10 = "highcaloric_10_L.jpg" /11 = "highcaloric_1_P.jpg" /12 = "highcaloric_2_P.jpg" /13 = "highcaloric_3_P.jpg" /14 = "highcaloric_4_P.jpg" /15 = "highcaloric_5_P.jpg" /16 = "highcaloric_6_P.jpg" /17 = "highcaloric_7_P.jpg" /18 = "highcaloric_8_P.jpg" /19 = "highcaloric_9_P.jpg" /20 = "highcaloric_10_P.jpg" /21 = "highcaloric_11_L.jpg" /22 = "highcaloric_12_L.jpg" /23 = "highcaloric_13_L.jpg" /24 = "highcaloric_14_L.jpg" /25 = "highcaloric_15_L.jpg" /26 = "highcaloric_16_L.jpg" /27 = "highcaloric_17_L.jpg" /28 = "highcaloric_18_L.jpg" /29 = "highcaloric_19_L.jpg" /30 = "highcaloric_20_L.jpg" /31 = "highcaloric_11_P.jpg" /32 = "highcaloric_12_P.jpg" /33 = "highcaloric_13_P.jpg" /34 = "highcaloric_14_P.jpg" /35 = "highcaloric_15_P.jpg" /36 = "highcaloric_16_P.jpg" /37 = "highcaloric_17_P.jpg" /38 = "highcaloric_18_P.jpg" /39 = "highcaloric_19_P.jpg" /40 = "highcaloric_20_P.jpg" /41 = "lowcaloric_1_L.jpg" /42 = "lowcaloric_2_L.jpg" /43 = "lowcaloric_3_L.jpg" /44 = "lowcaloric_4_L.jpg" /45 = "lowcaloric_5_L.jpg" /46 = "lowcaloric_6_L.jpg" /47 = "lowcaloric_7_L.jpg" /48 = "lowcaloric_8_L.jpg" /49 = "lowcaloric_9_L.jpg" /50 = "lowcaloric_10_L.jpg" /51 = "lowcaloric_1_P.jpg" /52 = "lowcaloric_2_P.jpg" /53 = "lowcaloric_3_P.jpg" /54 = "lowcaloric_4_P.jpg" /55 = "lowcaloric_5_P.jpg" /56 = "lowcaloric_6_P.jpg" /57 = "lowcaloric_7_P.jpg" /58 = "lowcaloric_8_P.jpg" /59 = "lowcaloric_9_P.jpg" /60 = "lowcaloric_10_P.jpg" /61 = "lowcaloric_11_L.jpg" /62 = "lowcaloric_12_L.jpg" /63 = "lowcaloric_13_L.jpg" /64 = "lowcaloric_14_L.jpg" /65 = "lowcaloric_15_L.jpg" /66 = "lowcaloric_16_L.jpg" /67 = "lowcaloric_17_L.jpg" /68 = "lowcaloric_18_L.jpg" /69 = "lowcaloric_19_L.jpg" /70 = "lowcaloric_20_L.jpg" /71 = "lowcaloric_11_P.jpg" /72 = "lowcaloric_12_P.jpg" /73 = "lowcaloric_13_P.jpg" /74 = "lowcaloric_14_P.jpg" /75 = "lowcaloric_15_P.jpg" /76 = "lowcaloric_16_P.jpg" /77 = "lowcaloric_17_P.jpg" /78 = "lowcaloric_18_P.jpg" /79 = "lowcaloric_19_P.jpg" /80 = "lowcaloric_20_P.jpg" /81 = "plant_1_L.jpg" /82 = "plant_2_L.jpg" /83 = "plant_3_L.jpg" /84 = "plant_4_L.jpg" /85 = "plant_5_L.jpg" /86 = "plant_6_L.jpg" /87 = "plant_7_L.jpg" /88 = "plant_8_L.jpg" /89 = "plant_9_L.jpg" /90 = "plant_10_L.jpg" /91 = "plant_1_P.jpg" /92 = "plant_2_P.jpg" /93 = "plant_3_P.jpg" /94 = "plant_4_P.jpg" /95 = "plant_5_P.jpg" /96 = "plant_6_P.jpg" /97 = "plant_7_P.jpg" /98 = "plant_8_P.jpg" /99 = "plant_9_P.jpg" /100 = "plant_10_P.jpg" /101 = "plant_11_L.jpg" /102 = "plant_12_L.jpg" /103 = "plant_13_L.jpg" /104 = "plant_14_L.jpg" /105 = "plant_15_L.jpg" /106 = "plant_16_L.jpg" /107 = "plant_17_L.jpg" /108 = "plant_18_L.jpg" /109 = "plant_19_L.jpg" /110 = "plant_20_L.jpg" /111 = "plant_11_P.jpg" /112 = "plant_12_P.jpg" /113 = "plant_13_P.jpg" /114 = "plant_14_P.jpg" /115 = "plant_15_P.jpg" /116 = "plant_16_P.jpg" /117 = "plant_17_P.jpg" /118 = "plant_18_P.jpg" /119 = "plant_19_P.jpg" /120 = "plant_20_P.jpg" /121 = "animal_1_L.jpg" /122 = "animal_2_L.jpg" /123 = "animal_3_L.jpg" /124 = "animal_4_L.jpg" /125 = "animal_5_L.jpg" /126 = "animal_6_L.jpg" /127 = "animal_7_L.jpg" /128 = "animal_8_L.jpg" /129 = "animal_9_L.jpg" /130 = "animal_10_L.jpg" /131 = "animal_1_P.jpg" /132 = "animal_2_P.jpg" /133 = "animal_3_P.jpg" /134 = "animal_4_P.jpg" /135 = "animal_5_P.jpg" /136 = "animal_6_P.jpg" /137 = "animal_7_P.jpg" /138 = "animal_8_P.jpg" /139 = "animal_9_P.jpg" /140 = "animal_10_P.jpg" /141 = "animal_11_L.jpg" /142 = "animal_12_L.jpg" /143 = "animal_13_L.jpg" /144 = "animal_14_L.jpg" /145 = "animal_15_L.jpg" /146 = "animal_16_L.jpg" /147 = "animal_17_L.jpg" /148 = "animal_18_L.jpg" /149 = "animal_19_L.jpg" /150 = "animal_20_L.jpg" /151 = "animal_11_P.jpg" /152 = "animal_12_P.jpg" /153 = "animal_13_P.jpg" /154 = "animal_14_P.jpg" /155 = "animal_15_P.jpg" /156 = "animal_16_P.jpg" /157 = "animal_17_P.jpg" /158 = "animal_18_P.jpg" /159 = "animal_19_P.jpg" /160 = "animal_20_P.jpg" NOTE: organization of practice stimuli 1: stimulus of format A (here: QUERFORMAT) 2: stimulus of format B (here: QUERFORMAT) /1 = "grayrectangle_L.jpg" /2 = "grayrectangle_P.jpg" *************************************************************************************** ********************************************* Editable Instructions ********************************************* *************************************************************************************** / windowsize = (80%, 60%) / fontstyle = ("Arial", 2.50%, false, false, false, false, 5, 0) /1 =" Willkommen! Bei der folgenden Aufgabe werden Ihnen Bilder entweder im Quer- oder im Hochformat präsentiert. Ihre Aufgabe ist folgende: ZIEHEN Sie den Joystick zu sich heran, wenn das Bild im <%values.format1%> ist. DRÜCKEN Sie den Joystick von sich weg, wenn das Bild im <%values.format2%> ist. Wenn Sie den Joystick zu sich heranziehen, wird das Bild größer. Wenn Sie den Joystick von sich wegdrücken, wird das Bild kleiner. Sie müssen den Joystick bis zum Anschlag heranziehen bzw. wegdrücken (bis es nicht mehr weitergeht) und ihn dann wieder in die Augsgangsposition zurückbringen. Danach wird ein neues Bild präsentiert. Bitte reagieren Sie so schnell und fehlerlos wie möglich. Bewegen Sie bitte den Joystick jetzt nach links." /2 = " Nun folgt der Übungsdurchlauf. Sie werden gleich graue Rechtecke im Hoch- oder im Querformat sehen. ZIEHEN Sie den Joystick zu sich heran, wenn das Rechteck im <%values.format1%> ist. DRÜCKEN Sie den Joystick von sich weg, wenn das Rechteck im <%values.format2%> ist. Denken Sie daran, den Joystick bis zum Anschlag heranzuziehen bzw. wegzudrücken und ihn dann wieder in die Augsgangsposition zurückbringen. Danach wird ein neues Bild präsentiert. Bitte reagieren Sie so schnell und fehlerlos wie möglich. Bewegen Sie den Joystick jetzt nach links, um mit dem Übungsdurchlauf zu beginnen." /3= " Nun beginnt die richtige Aufgabe. Sie werden gleich verschiedene Bilder mit Tieren, Pflanzen oder Essen im Hoch- oder im Querformat sehen. Gehen Sie wie in der Übung vor: ZIEHEN Sie den Joystick zu sich heran, wenn das Bild im <%values.format1%> ist. DRÜCKEN Sie den Joystick von sich weg, wenn das Bild im <%values.format2%> ist. Bitte reagieren Sie so schnell und fehlerlos wie möglich. Die Aufgabe dauert ca. 10 Minuten Bewegen Sie den Joystick jetzt nach links, um mit der Übung zu beginnen. " Sie haben es geschafft! Vielen Dank für Ihre Teilnahme! *************************************************************************************** ********************************************* Editable Lists ********************************************* *************************************************************************************** AAT lists contain the indices of the target stimuli for each category NOTE: if the number of stimuli per category changes, change the appropriate list accordingly / items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30) / replace = false / items = (11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40) / replace = false / items = (41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70) / replace = false / items = (51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80) / replace = false / items = (81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110) / replace = false / items = (91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120) / replace = false / items = (121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150) / replace = false / items = (131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160) / replace = false ******************************************************************************************************************* ******************************************************************************************************************* DATA: this section contains data file information ******************************************************************************************************************* ******************************************************************************************************************* ***************** raw data ***************** date, time, subject: date and time script was run with the current subjectnumber /expcondition: used for counterbalancing experimental conditions 1: push for QUERFORMAT, pull for HOCHFORMAT 2: pull for QUERFORMAT, push for HOCHFORMAT blockcode, blocknum: the name and number of the current block trialcode, trialnum: the name and number of the currently recorded trial (Note: not all trials that are run might record data) /stimulus: the presented stimulus /targetcategory: the targetcategory of the targetstimulus, 1 - 4 /targetformat : the targetformat of the targetstimulus (l = QUERFORMAT; p = HOCHFORMAT) /initialresponse: stores the original response to the stimulus /correct: stores the correctness of the initial response /finalresponse: stores the final response (at time joystick is fully extended) /changedirection: stores whether and how often participant changed direction during zooming (0 = no change) /RT: stores the latency of the initial response (in ms) /completeRT: stores how long it takes until the joystick is fully extended in whatever direction (in ms) /file = "AAT_raw.iqdat" / separatefiles = true / columns = [date, time, subject, values.expcondition, blockcode, blocknum, values.trialcode, trialnum, values.stimulus, values.targetcategory,values.targetformat, values.initialresponse, values.correct, values.finalresponse, values.changedirection, values.RT, values.completeRT] ***************** summary data ***************** script.elapsedtime: time it took to run script (in ms) completed: 0 = script was not completed; 1 = script was completed (all conditions run) uncorrecte AAT Difference Scores for each of the 4 main categories, Diff Scores = median latency for Push trials - median latency for Pull trials !!! NOTE: NOT corrected for accuracy, latency only for original response (not until joystick is fully extended) /sequence: the experimental sequence generated for the participant /file = "ATT_summary.iqdat" /columns = [script.startdate, script.starttime, script.subjectid, script.elapsedtime, values.completed, values.expcondition, expressions.aat_diffscore_cat1, expressions.aat_diffscore_cat2, values.sequence] ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ************************************************************************************************************** ************************************************************************************************************** DEFAULT SCREEN SETTING ************************************************************************************************************** ************************************************************************************************************** requires Inquisit 4.0.4.0 /canvasaspectratio = (4,3) /minimumversion = "4.0.4.0" / inputdevice = joystick /joystickthreshold = 30 /screencolor = black ************************************************************************************************************** ************************************************************************************************************** VALUES: automatically updated ************************************************************************************************************** ************************************************************************************************************** AAT code: /nextstimulus : the number of the next targetstimulus to be presented /selectstimulus: the index of targetstimulus (in item ) /targetcategory: the targetcategory of the targetstimulus, 1 - 4 /targetformat : the targetformat of the targetstimulus (l = QUERFORMAT; p = HOCHFORMAT) /sumRTcorrect_1- sumRTcorrect_8 : the sum of latencies for stimuli of (e.g.) category 1 - only for correct responses /sumRT_1 - sumRT_8: the sum of latencies for stimuli of (e.g.) category 1 - regardless of accuracy /repeat: helper variable: counts how often a change trial has run itself /selectpracticepicture: helper variable: dictates which rectangle (QUERFORMAT/HOCHFORMAT) to select for practice /starttime: determines the starttime of a trial (measured at beginning of a picture trial) /endtime: determines the endtime of a zooming (measured at end of zoom trials) /expcondition: used for counterbalancing experimental conditions /format1/forma2: helper variables for instruction purposes; set in expt /startheight_A/startheight_B: sets the default height of the A(QUERFORMAT)/B (HOCHFORMAT) picture /Maxheight_px: maximum height for pictures (display.canvasheight) in pixels /joystick_y: helper variable to track the y-position of the joystick /completeRT: stores how long it takes until the joystick is fully extended /changedirection: stores whether and how often participant changed direction during zooming (0 = no change) /joystickchange: stores the absolute change in joystick y-positions from one zoom trial to the next /trialcode: stores the trialcode of the trial /RT: stores the latency of the initial response /correct: stores the correctness of the initial response /stimulus: stores the stimulus /initialresponse: stores the initial response /finalresponse: stores the final response (at time joystick is fully extended) completed: 0 = script was not completed; 1 = script was completed (all conditions run) /nextstimulus = 0 /selectstimulus = 0 /targetcategory = 0 /targetformat = "" /sumRTcorrect_1 = 0 /sumRT_1 = 0 /sumRTcorrect_2 = 0 /sumRT_2 = 0 /sumRTcorrect_3 = 0 /sumRT_3 = 0 /sumRTcorrect_4 = 0 /sumRT_4 = 0 /sumRTcorrect_5 = 0 /sumRT_5 = 0 /sumRTcorrect_6 = 0 /sumRT_6 = 0 /sumRTcorrect_7 = 0 /sumRT_7 = 0 /sumRTcorrect_8 = 0 /sumRT_8 = 0 /repeat = 0 /selectpracticepicture = 0 /starttime = 0 /endtime = 0 /expcondition = 0 /format1 = 0 /format2 = 0 /startheight_A = 0 /startheight_B = 0 /Maxheight_px = display.canvasheight /joystick_y = 0 /completeRT = 0 /changedirection = 0 /joystick_change = 0 /trialcode = 0 /RT = 0 /correct = 0 /stimulus = 0 /initialresponse = "" /finalresponse = "" /completed = 0 ************************************************************************************************************** ************************************************************************************************************** EXPRESSIONS ************************************************************************************************************** ************************************************************************************************************** uncorrecte AAT Difference Scores for each of the 4 main categories, Diff Scores = median latency for Push trials - median latency for Pull trials !!! NOTE: NOT corrected for accuracy, latency only for original response (not until joystick is fully extended) /maxheightchange_px: max pixel height change of picture / AAT_Diffscore_Cat1 = if (values.expcondition == 1) trial.AAT_1.medianlatency - trial.AAT_2.medianlatency else trial.AAT_2.medianlatency - trial.AAT_1.medianlatency / AAT_Diffscore_Cat2 = if (values.expcondition == 1) trial.AAT_3.medianlatency - trial.AAT_4.medianlatency else trial.AAT_4.medianlatency - trial.AAT_3.medianlatency / AAT_Diffscore_Cat3 = if (values.expcondition == 1) trial.AAT_5.medianlatency - trial.AAT_6.medianlatency else trial.AAT_6.medianlatency - trial.AAT_5.medianlatency / AAT_Diffscore_Cat4 = if (values.expcondition == 1) trial.AAT_7.medianlatency - trial.AAT_8.medianlatency else trial.AAT_8.medianlatency - trial.AAT_7.medianlatency /maxheightchange_px = if (values.targetformat == "l") {(values.Startheight_ratioA - values.MinHeight_ratioA) * values.Maxheight_px} else {(values.Startheight_ratioB - values.MinHeight_ratioB) * values.Maxheight_px} ************************************************************************************************************** ************************************************************************************************************** INSTRUCTIONS ************************************************************************************************************** ************************************************************************************************************** /items = instructions /select = sequence /position = (50%, 50%) / fontstyle = ("Arial", 3%, false, false, false, false, 5, 0) /txcolor = black /resetinterval = 3 /size = (80%, 80%) /stimulusframes = [1 = instruction] /validresponse = ("left") /recorddata = false /branch = [trial.instruct_joystickrest] Note: trial.instruct_joystickrest & trial.instruct_pause make sure that Joystick is brought back into rest position /validresponse = (change) /branch = [if (monkey.monkeymode == 1) trial.instruct_pause] /branch = [if (joystick.y == 0 && joystick.x == 0) trial.Instruct_Pause else trial.instruct_joystickrest] /recorddata = false / stimulusframes = [1 = eraser] / timeout = 0 / recorddata = false ************************************************************************************************************** ************************************************************************************************************** AAT STIMULI ************************************************************************************************************** ************************************************************************************************************** / items = targets / select = values.selectstimulus / position = (50%, 50%) / size = (100%, 100%) / erase = false ***helper stimulus / shape = rectangle / color = black / size = (100%, 100%) / erase = false ************************************************************************************************************** ************************************************************************************************************** AAT PRACTICE ************************************************************************************************************** ************************************************************************************************************** ************************* Practice Stimuli ************************* / items = ("FEHLER") / position = (50%, 50%) / fontstyle = ("Arial", 5%, true, false, false, false, 5, 0) / txcolor = (white) /txbgcolor = (red) ************************* Practice Stimuli ************************* NOTE: picture.practicetarget selects the target via values.selectpracticepicture (this value is set in the practice trials, see below) / items = practicestimuli / select = values.selectpracticepicture / position = (50%, 50%) / size = (100%, 100%) / erase = false ************************* Practice Trials ************************* NOTE: practice trials report error feedback to participant. NOTE: *trial.practicetrial_A displays the stimulus of format A (here: QUERFORMAT) by setting values.selectpracticepicture = 1 *if a forward movement (=push) is detected -> decrease picture *if a back movement (=pull) is detected -> increase picture /ontrialbegin = [values.targetformat = "l"] / ontrialbegin = [values.selectpracticepicture = 1] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [picture.practicetarget.height = values.startheight_A] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = practicetarget] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_A.response == "forward") || (values.expcondition == 2 && trial.practicetrial_A.response == "back")] / errormessage = true(error,0) / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] /ontrialend = [values.trialcode = "practicetrial_A"] /ontrialend = [values.RT = trial.practicetrial_A.latency] /ontrialend = [values.correct = trial.practicetrial_A.correct] /ontrialend = [values.stimulus = picture.practicetarget.currentitem] /ontrialend = [if (trial.practicetrial_A.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] / branch = [if (trial.practicetrial_A.response == "forward") trial.practicedecrease else trial.practiceincrease] / recorddata = false NOTE: trial.practicetrial_B displays the stimulus of format B (here: HOCHFORMAT) by setting values.selectpracticepicture = 2 *if a forward movement (=push) is detected -> decrease picture *if a back movement (=pull) is detected -> increase picture /ontrialbegin = [values.targetformat = "p"] /ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.repeat = 0] / ontrialbegin = [values.selectpracticepicture = 2] / ontrialbegin = [picture.practicetarget.height = values.startheight_B] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = practicetarget] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_B.response == "back") || (values.expcondition == 2 && trial.practicetrial_B.response == "forward")] / errormessage = true(error,0) /ontrialend = [values.joystick_y = joystick.y] /ontrialend = [values.joystick_change = abs(values.joystick_y)] /ontrialend = [values.trialcode = "practicetrial_B"] /ontrialend = [values.RT = trial.practicetrial_B.latency] /ontrialend = [values.correct = trial.practicetrial_B.correct] /ontrialend = [values.stimulus = picture.practicetarget.currentitem] /ontrialend = [if (trial.practicetrial_B.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] / branch = [if (trial.practicetrial_B.response == "forward") trial.practicedecrease else trial.practiceincrease] /recorddata = false *********ZOOM FEATURE: trial increase/decrease the size of the rectangles depending on participant's response********* / iscorrectresponse = [(values.expcondition == 1 && trial.practicetrial_B.response == "back") || (values.expcondition == 2 && trial.practicetrial_B.response == "forward")] /ontrialbegin = [if (values.expcondition == 1 && values.targetformat == "p") trial.practicedecrease.insertstimulustime(text.error, 0)] /ontrialbegin = [if (values.expcondition == 2 && values.targetformat == "l") trial.practicedecrease.insertstimulustime(text.error, 0)] / ontrialbegin = [picture.practicetarget.height = picture.practicetarget.height - values.joystick_change/1000 * expressions.maxheightchange_px] / stimulusframes = [1 = eraser, practicetarget] /validresponse = (change) / monkeyresponse = ("back", "forward") /ontrialend = [values.joystick_change = abs(values.joystick_y - joystick.y)] /ontrialend = [trial.practicedecrease.resetstimulusframes()] /branch = [if (monkey.monkeymode == 1) {values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.intertrialinterval}] /branch = [if (joystick.y <= -1000) {values.joystick_y = joystick.y; values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.enddecrease_practice}] /branch = [if (joystick.y <= values.joystick_y) {values.joystick_y = joystick.y; trial.practicedecrease}] /branch = [if (joystick.y > values.joystick_y) {values.joystick_y = joystick.y; values.changedirection += 1; trial.practiceincrease}] / recorddata = false /ontrialbegin = [if (values.expcondition == 1 && values.targetformat == "l") trial.practiceincrease.insertstimulustime(text.error, 0)] /ontrialbegin = [if (values.expcondition == 2 && values.targetformat == "p") trial.practiceincrease.insertstimulustime(text.error, 0)] / ontrialbegin = [picture.practicetarget.height = picture.practicetarget.height + values.joystick_change/1000 * expressions.maxheightchange_px] / stimulusframes = [1 = practicetarget] /validresponse = (change) / monkeyresponse = ("back", "forward") /ontrialend = [values.joystick_change = abs(values.joystick_y - joystick.y)] /ontrialend = [trial.practiceincrease.resetstimulusframes()] /branch = [if (monkey.monkeymode == 1) {values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.intertrialinterval}] /branch = [if (joystick.y >= 1000) {values.joystick_y = joystick.y; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincrease_practice}] /branch = [if (joystick.y >= values.joystick_y) {values.joystick_y = joystick.y; trial.practiceincrease}] /branch = [if (joystick.y < values.joystick_y) {values.joystick_y = joystick.y; values.changedirection += 1; trial.practicedecrease}] /recorddata = false Note: trials show the last size of the picture / ontrialbegin = [picture.practicetarget.height = picture.practicetarget.height + values.joystick_change/1000 * expressions.maxheightchange_px] /stimulusframes = [1 = practicetarget] /timeout = 0 /branch = [trial.joystickrest] /recorddata = false /ontrialbegin = [picture.practicetarget.height = picture.practicetarget.height - values.joystick_change/1000 * expressions.maxheightchange_px] /stimulusframes = [1 = eraser, practicetarget] /timeout = 0 /branch = [trial.joystickrest] /recorddata = false ************************* Practice Block ************************* NOTE: block.practice_AAT presents 10 practice trials randomly (without replacement) selecting from format A (QUERFORMAT) (N=5) and format B (HOCHFORMAT) stimuli (N=5) / trials = [1-2 = instructions; 3-22 = noreplace(practicetrial_A, practicetrial_B)] ************************************************************************************************************** ************************************************************************************************************** AAT EXPERIMENTAL TRIALS ************************************************************************************************************** ************************************************************************************************************** Trial Sequence for each targetstimulus: trial.AAT_start -> (e.g.) trial.AAT_1 -> (e.g. depending on response) trial.decrease ->....-> trial.decrease (until a set amount of trial.decrease have run) ********************************************************************** trial that selects the next targetstimulus category (1-8) ********************************************************************** Debug: / items = ("<%values.nextstimulus%>") / position = (50%, 60%) / fontstyle = ("Arial", 2.33%, false, false, false, false, 5, 0) NOTE: trial.AAT_start is only necessary if a preestablished sequence of target categories is used (either generated at the beginning of the experiment or by selecting from a pool of pregenerated sequences). The trial determines the next target category via values.nextstimulus and calls the corresponding trial for that category (e.g. trial.AAT_1). / ontrialbegin = [values.nextstimulus = substring(values.sequence, values.index, 1); values.index += 1] / ontrialbegin = [values.repeat = 0] / timeout = 0 / branch = [if (values.nextstimulus == 1) trial.AAT_1] / branch = [if (values.nextstimulus == 2) trial.AAT_2] / branch = [if (values.nextstimulus == 3) trial.AAT_3] / branch = [if (values.nextstimulus == 4) trial.AAT_4] / branch = [if (values.nextstimulus == 5) trial.AAT_5] / branch = [if (values.nextstimulus == 6) trial.AAT_6] / branch = [if (values.nextstimulus == 7) trial.AAT_7] / branch = [if (values.nextstimulus == 8) trial.AAT_8] / recorddata = false ********************************************************************** trials that select targetstimuli via list.categoryX and take in initial response ********************************************************************** / ontrialbegin = [values.selectstimulus = list.category1.nextvalue] / ontrialbegin = [values.targetcategory = 1; values.targetformat = "l"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_A] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_1.response == "forward") || (values.expcondition == 2 && trial.AAT_1.response == "back")] / ontrialend = [if (trial.AAT_1.correct) values.sumRTcorrect_1 += trial.AAT_1.latency] / ontrialend = [values.sumRT_1 += trial.AAT_1.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_1"] / ontrialend = [values.RT = trial.AAT_1.latency] / ontrialend = [values.correct = trial.AAT_1.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_1.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] / branch = [if (trial.AAT_1.response == "forward") trial.decrease else trial.increase] /recorddata = false / ontrialbegin = [values.selectstimulus = list.category2.nextvalue] / ontrialbegin = [values.targetcategory = 1; values.targetformat = "p"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_B] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_2.response == "back") || (values.expcondition == 2 && trial.AAT_2.response == "forward")] / ontrialend = [if (trial.AAT_2.correct) values.sumRTcorrect_2 += trial.AAT_2.latency] / ontrialend = [values.sumRT_2 += trial.AAT_2.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_2"] / ontrialend = [values.RT = trial.AAT_2.latency] / ontrialend = [values.correct = trial.AAT_2.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_2.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] /branch = [if (trial.AAT_2.response == "forward") trial.decrease else trial.increase] /recorddata = false / ontrialbegin = [values.selectstimulus = list.category3.nextvalue] / ontrialbegin = [values.targetcategory = 2; values.targetformat = "l"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_A] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_3.response == "forward") || (values.expcondition == 2 && trial.AAT_3.response == "back")] / ontrialend = [if (trial.AAT_3.correct) values.sumRTcorrect_3 += trial.AAT_3.latency] / ontrialend = [values.sumRT_3 += trial.AAT_3.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_3"] / ontrialend = [values.RT = trial.AAT_3.latency] / ontrialend = [values.correct = trial.AAT_3.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_3.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] /branch = [if (trial.AAT_3.response == "forward") trial.decrease else trial.increase] /recorddata = false / ontrialbegin = [values.selectstimulus = list.category4.nextvalue] / ontrialbegin = [values.targetcategory = 2; values.targetformat = "p"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_B] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_4.response == "back") || (values.expcondition == 2 && trial.AAT_4.response == "forward")] / ontrialend = [if (trial.AAT_4.correct) values.sumRTcorrect_4 += trial.AAT_4.latency] / ontrialend = [values.sumRT_4 += trial.AAT_4.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_4"] / ontrialend = [values.RT = trial.AAT_4.latency] / ontrialend = [values.correct = trial.AAT_4.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_4.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] / ontrialbegin = [values.selectstimulus = list.category5.nextvalue] / ontrialbegin = [values.targetcategory = 3; values.targetformat = "l"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_A] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_5.response == "forward") || (values.expcondition == 2 && trial.AAT_5.response == "back")] / ontrialend = [if (trial.AAT_5.correct) values.sumRTcorrect_5 += trial.AAT_5.latency] / ontrialend = [values.sumRT_5 += trial.AAT_5.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_5"] / ontrialend = [values.RT = trial.AAT_5.latency] / ontrialend = [values.correct = trial.AAT_5.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_5.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] /branch = [if (trial.AAT_5.response == "forward") trial.decrease else trial.increase] /recorddata = false / ontrialbegin = [values.selectstimulus = list.category6.nextvalue] / ontrialbegin = [values.targetcategory = 3; values.targetformat = "p"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_B] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_6.response == "back") || (values.expcondition == 2 && trial.AAT_6.response == "forward")] / ontrialend = [if (trial.AAT_6.correct) values.sumRTcorrect_6 += trial.AAT_6.latency] / ontrialend = [values.sumRT_6 += trial.AAT_6.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_6"] / ontrialend = [values.RT = trial.AAT_6.latency] / ontrialend = [values.correct = trial.AAT_6.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_6.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] /branch = [if (trial.AAT_6.response == "forward") trial.decrease else trial.increase] /recorddata = false / ontrialbegin = [values.selectstimulus = list.category7.nextvalue] / ontrialbegin = [values.targetcategory = 4; values.targetformat = "l"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_A] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_7.response == "forward") || (values.expcondition == 2 && trial.AAT_7.response == "back")] / ontrialend = [if (trial.AAT_7.correct) values.sumRTcorrect_7 += trial.AAT_7.latency] / ontrialend = [values.sumRT_7 += trial.AAT_7.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_7"] / ontrialend = [values.RT = trial.AAT_7.latency] / ontrialend = [values.correct = trial.AAT_7.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_7.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] /branch = [if (trial.AAT_7.response == "forward") trial.decrease else trial.increase] /recorddata = false / ontrialbegin = [values.selectstimulus = list.category8.nextvalue] / ontrialbegin = [values.targetcategory = 4; values.targetformat = "p"] / ontrialbegin = [picture.targetstimulus.height = values.startheight_B] / ontrialbegin = [values.starttime = script.elapsedtime; values.endtime = 0] / ontrialbegin = [values.completeRT = 0; values.changedirection = 0; values.finalresponse=""] / stimulusframes = [1 = targetstimulus] / validresponse = (back, forward) / iscorrectresponse = [(values.expcondition == 1 && trial.AAT_8.response == "back") || (values.expcondition == 2 && trial.AAT_8.response == "forward")] / ontrialend = [if (trial.AAT_8.correct) values.sumRTcorrect_8 += trial.AAT_8.latency] / ontrialend = [values.sumRT_8 += trial.AAT_8.latency] / ontrialend = [values.joystick_y = joystick.y] / ontrialend = [values.joystick_change = abs(values.joystick_y)] / ontrialend = [values.trialcode = "AAT_8"] / ontrialend = [values.RT = trial.AAT_8.latency] / ontrialend = [values.correct = trial.AAT_8.correct] / ontrialend = [values.stimulus = picture.targetstimulus.currentitem] / ontrialend = [if (trial.AAT_8.response == "forward") values.initialresponse = "PUSH" else values.initialresponse = "PULL"] /branch = [if (trial.AAT_8.response == "forward") trial.decrease else trial.increase] /recorddata = false ********************************************************************** ZOOM trials that control the size changes of the target stimuli as dictated by response; zoom trials come to an end when the joystick is fully extended ********************************************************************** / ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height - values.joystick_change/1000 * expressions.maxheightchange_px] / stimulusframes = [1 = eraser, targetstimulus] /validresponse = (change) / monkeyresponse = ("back", "forward") /ontrialend = [values.joystick_change = abs(values.joystick_y - joystick.y)] /branch = [if (monkey.monkeymode == 1) {values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.intertrialinterval}] /branch = [if (joystick.y <= -1000) {values.joystick_y = joystick.y; values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.enddecrease}] /branch = [if (joystick.y <= values.joystick_y) {values.joystick_y = joystick.y; trial.decrease}] /branch = [if (joystick.y > values.joystick_y) {values.joystick_y = joystick.y; values.changedirection += 1; trial.increase}] / recorddata = false / ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height + values.joystick_change/1000 * expressions.maxheightchange_px] / stimulusframes = [1 = targetstimulus] /validresponse = (change) / monkeyresponse = ("back", "forward") /ontrialend = [values.joystick_change = abs(values.joystick_y - joystick.y)] /branch = [if (monkey.monkeymode == 1) {values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.intertrialinterval}] /branch = [if (joystick.y >= 1000) {values.joystick_y = joystick.y; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincrease}] /branch = [if (joystick.y >= values.joystick_y) {values.joystick_y = joystick.y; trial.increase}] /branch = [if (joystick.y < values.joystick_y) {values.joystick_y = joystick.y; values.changedirection += 1; trial.decrease}] /recorddata = false Note: trials show the last size of the picture / ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height + values.joystick_change/1000 * expressions.maxheightchange_px] /stimulusframes = [1 = targetstimulus] /timeout = 0 /branch = [trial.joystickrest] /recorddata = false /ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height - values.joystick_change/1000 * expressions.maxheightchange_px] /stimulusframes = [1 = eraser, targetstimulus] /timeout = 0 /branch = [trial.joystickrest] /recorddata = false ********************************************************************** Helper Trials: *trial.joystickrest: tracks that joystick was moved back into the rest position *trial. InterTrialInterval : sets a predetermined InterTrialInterval (and stores all relevant data in the data file to have one complete dataline for each trial) ********************************************************************** /isvalidresponse = [trial.joystickrest.response =="change"] /branch = [if (joystick.y == 0 && joystick.x == 0) trial.InterTrialInterval else trial.joystickrest] /recorddata = false / monkeyresponse = ("change") /ontrialbegin = [values.completeRT= values.endtime - values.starttime] / stimulusframes = [1 = eraser] / timeout = values.intertrialinterval / recorddata = true ************************************************************************************************************** ************************************************************************************************************** AAT EXPERIMENTAL BLOCKS ************************************************************************************************************** ************************************************************************************************************** Note: if you adjust values.totaltrialcount, you need to adjust the number of trials called by block.AAT / onblockbegin = [values.index = 0] / trials = [1 = instructions; 2-161 = AAT_start] Note: trial.AAT_start uses a pregenerated trialsequence, if the order of the trial can be random use the following code: block AAT> / trials = [1 = instructions; 2-81 = noreplace(AAT_1, AAT_2, AAT_3, AAT_4)] ************************************************************************************************************** ************************************************************************************************************** EXPERIMENT ************************************************************************************************************** ************************************************************************************************************** NOTE: format/direction counterbalanced by group number / onexptbegin = [values.expcondition = 1] / onexptbegin = [values.format1 = "HOCHFORMAT"; values.format2 = "QUERFORMAT"] / subjects = (1 of 2) /groupassignment = groupnumber / onexptbegin = [values.startheight_A = values.Startheight_ratioA*values.Maxheight_px] / onexptbegin = [values.startheight_B = values.Startheight_ratioB* values.Maxheight_px] / blocks = [1 = SequenceGenerator; 2 = practice_AAT; 3 = AAT] / postinstructions = (End) / onexptend = [values.completed = 1] / onexptbegin = [values.expcondition = 2] / onexptbegin = [values.format2 = "HOCHFORMAT"; values.format1 = "QUERFORMAT"] / subjects = (2 of 2) /groupassignment = groupnumber / onexptbegin = [values.startheight_A = values.Startheight_ratioA*values.Maxheight_px] / onexptbegin = [values.startheight_B = values.Startheight_ratioB*values.Maxheight_px] / blocks = [1 = SequenceGenerator; 2 = practice_AAT; 3 = AAT] / postinstructions = (End) / onexptend = [values.completed = 1] ************************************************************************************************************** END OF FILE **************************************************************************************************************