AAT Demo - Shortening Script


Author
Message
acarnegie
acarnegie
Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)
Group: Awaiting Activation
Posts: 10, Visits: 39
Hi,

I need to demonstrate the AAT experiment that I conducted for my undergrad thesis during my orals defense board in a few weeks.  I have tried editing the script myself to condense it, but I have it programmed so that trigger warnings pop up before the aversive images.  Every time I have tried condensing it myself, the warnings begin appearing before all images rather than just the aversive ones.

The aversive images that I would like to include are:  1_A_L.jpg, 1_SP_L.jpg, 1_P_L.jpg, 1_BL_L.jpg, 1_G_L.jpg, 1_DR_L.jpg, 1_AL_L.jpg, 1_D_L.jpg, 1_PB_L.jpg, 1_WA_L.jpg

and the following neutral images: 2_1_L.jpg, 2_2_L.jpg, 2_3_L.jpg, 2_4_L.jpg, 2_5_L.jpg, 2_6_L.jpg, 2_7_L.jpg, 2_8_L.jpg, 2_9_L.jpg, 2_10_L.jpg


I would like to rid of all other stimuli and have the aformentioned ones only shown once each. I would also like the trigger warnings that I have programmed to only appear before the aversive set of images that I mentioned above.

Below is the script that I have so far, please let me know what I can do to make this happen, thanks!

<values>
/Startheight_ratioA = 0.5
/Startheight_ratioB = 0.6
/MinHeight_ratioA = 0.05
/MinHeight_ratioB = 0.1
/intertrialinterval = 300
/pixeltolerance = 5
</values>

<text triggerwarning>
/ items = ("TRIGGER WARNING", "")
/ fontstyle = ("Arial", 40pt, true)
/ txcolor = (red)
/ select = values.warning
</text>

<values>
/warning = 1
</values>

<item targets>
/1 = "1_A_L.jpg"
/2 = "1_SP_L.jpg"
/3 = "1_P_L.jpg"
/4 = "1_BL_L.jpg"
/5 = "1_G_L.jpg"
/6 = "1_DR_L.jpg"
/7 = "1_AL_L.jpg"
/8 = "1_D_L.jpg"
/9 = "1_PB_L.jpg"
/10 = "1_WA_L.jpg"

/11 = "1_A_P.jpg"
/12 = "1_SP_P.jpg"
/13 = "1_P_P.jpg"
/14 = "1_BL_P.jpg"
/15 = "1_G_P.jpg"
/16 = "1_DR_P.jpg"
/17 = "1_AL_P.jpg"
/18 = "1_D_P.jpg"
/19 = "1_PB_P.jpg"
/20 = "1_WA_P.jpg"

/21 = "1_R_L.jpg"
/22 = "1_AB_L.jpg"
/23 = "1_V_L.jpg"
/24 = "1_W_L.jpg"
/25 = "1_B_L.jpg"
/26 = "1_S_L.jpg"
/27 = "1_NU_L.jpg"
/28 = "1_DD_L.jpg"
/29 = "1_AW_L.jpg"
/30 = "1_DS_L.jpg"

/31 = "1_R_P.jpg"
/32 = "1_AB_P.jpg"
/33 = "1_V_P.jpg"
/34 = "1_W_P.jpg"
/35 = "1_B_P.jpg"
/36 = "1_S_P.jpg"
/37 = "1_NU_P.jpg"
/38 = "1_DD_P.jpg"
/39 = "1_AW_P.jpg"
/40 = "1_DS_P.jpg"

/41 = "2_1_L.jpg"
/42 = "2_2_L.jpg"
/43 = "2_3_L.jpg"
/44 = "2_4_L.jpg"
/45 = "2_5_L.jpg"
/46 = "2_6_L.jpg"
/47 = "2_7_L.jpg"
/48 = "2_8_L.jpg"
/49 = "2_9_L.jpg"
/50 = "2_10_L.jpg"

/51 = "2_1_P.jpg"
/52 = "2_2_P.jpg"
/53 = "2_3_P.jpg"
/54 = "2_4_P.jpg"
/55 = "2_5_P.jpg"
/56 = "2_6_P.jpg"
/57 = "2_7_P.jpg"
/58 = "2_8_P.jpg"
/59 = "2_9_P.jpg"
/60 = "2_10_P.jpg"

/61 = "2_11_L.jpg"
/62 = "2_12_L.jpg"
/63 = "2_13_L.jpg"
/64 = "2_14_L.jpg"
/65 = "2_15_L.jpg"
/66 = "2_16_L.jpg"
/67 = "2_17_L.jpg"
/68 = "2_18_L.jpg"
/69 = "2_19_L.jpg"
/70 = "2_20_L.jpg"

/71 = "2_11_P.jpg"
/72 = "2_12_P.jpg"
/73 = "2_13_P.jpg"
/74 = "2_14_P.jpg"
/75 = "2_15_P.jpg"
/76 = "2_16_P.jpg"
/77 = "2_17_P.jpg"
/78 = "2_18_P.jpg"
/79 = "2_19_P.jpg"
/80 = "2_20_P.jpg"
</item>

<instruct >
/ windowsize = (90%, 90%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 0)
/inputdevice = mouse
/finishlabel = "Click here to continue"
/nextlabel = "Click here to continue"
/prevlabel = "Click here to go back"
</instruct>

<page taskinstructions>
This is the real task.
^^You will be presented with different types of images in either landscape or portrait format. Just like you did during practice,
^^**********************************************************************************
^* Move the mouse UP if you see a rectangle in <%values.format2%> format
^^* Move the mouse DOWN if you see a rectangle in <%values.format1%> format
^***********************************************************************************
^^^Be as fast and accurate as you possibly can. There will be 80 images total.
^^^Click the button to start.
</page>

<page End>
You have reached the end of the task.
^^Please notify the experimenter by raising your hand to indicate that you are ready to move on to the next component of this experiment.
</page>

<item trialstartinstructions>
/1 = "Click on the center of the 'X'"
</item>

<list category1>
/ items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
/ replace = false
</list>

<list category2>
/ items = (11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
/ replace = false
</list>

<list category3>
/ items = (21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
/ replace = false
</list>

<list category4>
/ items = (31, 32, 33, 34, 35, 36, 37, 38, 39, 40)
/ replace = false
</list>

<list category5>
/ items = (41, 42, 43, 44, 45, 46, 47, 48, 49, 50)
/ replace = false
</list>

<list category6>
/ items = (51, 52, 53, 54, 55, 56, 57, 58, 59, 60)
/ replace = false
</list>

<list category7>
/ items = (61, 62, 63, 64, 65, 66, 67, 68, 69, 70)
/ replace = false
</list>

<list category8>
/ items = (71, 72, 73, 74, 75, 76, 77, 78, 79, 80)
/ replace = false
</list>

<data >
/file = "AATmouseinput_raw.iqdat"
/ separatefiles = true
/ columns = [subject, blockcode, values.stimulus,
values.initialresponse, values.correct, values.finalresponse, values.changedirection,
values.RT, values.completeRT]
</data>

<summarydata >
/file = "ATTmouseinput_summary.iqdat"
/columns = [script.startdate, script.starttime, script.subjectid, script.elapsedtime, values.completed, values.expcondition,
expressions.aat_diffscore_cat1, expressions.aat_diffscore_cat2,
expressions.aat_diffscore_cat3, expressions.aat_diffscore_cat4, values.sequence]
</summarydata>

<defaults >
/canvasaspectratio = (4,3)
/minimumversion = "4.0.4.0"
/ inputdevice = mouse
</defaults>

<values >
/totaltrialcount = 80
/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 = display.canvasheight
/mouse_y = 0
/completeRT = 0
/changedirection = 0
/mouse_change = 0
/trialcode = 0
/RT = 0
/correct = 0
/stimulus = 0
/initialresponse = ""
/finalresponse = ""
/response = 0
/completed = 0
</values>

<expressions >
/ 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}
else {(values.Startheight_ratioB - values.MinHeight_ratioB) * values.Maxheight}
</expressions>

<picture targetstimulus>
/ items = targets
/ select = values.selectstimulus
/ position = (50%, 50%)
/ size = (100%, 100%)
/ erase = false
</picture>

<shape eraser>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
/ erase = false
</shape>

<text instructtext>
/items = trialstartinstructions
/select = 1
/position = (50%, 40%)
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
</text>

<text center>
/items = ("X")
/position = (50%, 50%)
/ fontstyle = ("Arial", 5%, true, false, false, false, 5, 1)
/ txcolor = (red)
</text>

<text nextstimulus>
/ items = ("<%values.nextstimulus%>")
/ position = (50%, 60%)
/ fontstyle = ("Arial", 2.33%, false, false, false, false, 5, 0)
</text>

<trial AAT_start>
/ ontrialbegin = [values.nextstimulus = substring(values.sequence, values.index, 1);
values.index += 1]
/ ontrialbegin = [values.repeat = 0]
/ timeout = 0
/ branch = [if (values.nextstimulus == 1) {values.warning=1; trial.AAT_1_start}]
/ branch = [if (values.nextstimulus == 2) {values.warning=1; trial.AAT_2_start}]
/ branch = [if (values.nextstimulus == 3) {values.warning=1; trial.AAT_3_start}]
/ branch = [if (values.nextstimulus == 4) {values.warning=1; trial.AAT_4_start}]
/ branch = [if (values.nextstimulus == 5) {values.warning=2; trial.AAT_5_start}]
/ branch = [if (values.nextstimulus == 6) {values.warning=2; trial.AAT_6_start}]
/ branch = [if (values.nextstimulus == 7) {values.warning=2; trial.AAT_7_start}]
/ branch = [if (values.nextstimulus == 8) {values.warning=2; trial.AAT_8_start}]
/ recorddata = false
</trial>

<trial AAT_1_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_1_start.responsey]
/recorddata = false
/branch = [trial.AAT_1]
</trial>

<trial AAT_2_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_2_start.responsey]
/recorddata = false
/branch = [trial.AAT_2]
</trial>

<trial AAT_3_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_3_start.responsey]
/recorddata = false
/branch = [trial.AAT_3]
</trial>

<trial AAT_4_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_4_start.responsey]
/recorddata = false
/branch = [trial.AAT_4]
</trial>

<trial AAT_5_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_5_start.responsey]
/recorddata = false
/branch = [trial.AAT_5]
</trial>

<trial AAT_6_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_6_start.responsey]
/recorddata = false
/branch = [trial.AAT_6]
</trial>

<trial AAT_7_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_7_start.responsey]
/recorddata = false
/branch = [trial.AAT_7]
</trial>

<trial AAT_8_start>
/inputdevice = mouse
/stimulusframes = [1 = instructtext, center]
/validresponse = (center)
/responsemessage = (center, triggerwarning, 100)
/ontrialend = [values.mouse_y = trial.AAT_8_start.responsey]
/recorddata = false
/branch = [trial.AAT_8]
</trial>

<trial AAT_1>
/inputdevice = mouse
/ ontrialbegin = [values.trialcode = "AAT_1"]
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_1.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_1.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_1.responsey < values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_1.responsey > values.mouse_y)]

/ ontrialend = [if (trial.AAT_1.correct) values.sumRTcorrect_1 += trial.AAT_1.latency]
/ ontrialend = [values.sumRT_1 += trial.AAT_1.latency]

/ontrialend = [if (trial.AAT_1.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_1.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_1.responsey]

/ ontrialend = [values.RT = trial.AAT_1.latency]
/ ontrialend = [values.correct = trial.AAT_1.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_2>
/inputdevice = mouse
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_2.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_2.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_2.responsey > values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_2.responsey < values.mouse_y)]

/ontrialend = [if (trial.AAT_2.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_2.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_2.responsey]

/ ontrialend = [if (trial.AAT_2.correct) values.sumRTcorrect_2 += trial.AAT_2.latency]
/ ontrialend = [values.sumRT_2 += trial.AAT_2.latency]

/ 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 (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]

/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_3>
/inputdevice = mouse
/ ontrialbegin = [values.trialcode = "AAT_3"]
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_3.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_3.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_3.responsey < values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_3.responsey > values.mouse_y)]

/ ontrialend = [if (trial.AAT_3.correct) values.sumRTcorrect_3 += trial.AAT_3.latency]
/ ontrialend = [values.sumRT_3 += trial.AAT_3.latency]

/ontrialend = [if (trial.AAT_3.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_3.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_3.responsey]

/ ontrialend = [values.RT = trial.AAT_3.latency]
/ ontrialend = [values.correct = trial.AAT_3.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_4>
/inputdevice = mouse
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_4.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_4.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_4.responsey > values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_4.responsey < values.mouse_y)]

/ontrialend = [if (trial.AAT_4.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_4.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_4.responsey]

/ ontrialend = [if (trial.AAT_4.correct) values.sumRTcorrect_4 += trial.AAT_4.latency]
/ ontrialend = [values.sumRT_4 += trial.AAT_4.latency]

/ 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 (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]

/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_5>
/inputdevice = mouse
/ ontrialbegin = [values.trialcode = "AAT_5"]
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_5.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_5.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_5.responsey < values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_5.responsey > values.mouse_y)]

/ ontrialend = [if (trial.AAT_5.correct) values.sumRTcorrect_5 += trial.AAT_5.latency]
/ ontrialend = [values.sumRT_5 += trial.AAT_5.latency]

/ontrialend = [if (trial.AAT_5.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_5.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_5.responsey]

/ ontrialend = [values.RT = trial.AAT_5.latency]
/ ontrialend = [values.correct = trial.AAT_5.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_6>
/inputdevice = mouse
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_6.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_6.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_6.responsey > values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_6.responsey < values.mouse_y)]

/ontrialend = [if (trial.AAT_6.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_6.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_6.responsey]

/ ontrialend = [if (trial.AAT_6.correct) values.sumRTcorrect_6 += trial.AAT_6.latency]
/ ontrialend = [values.sumRT_6 += trial.AAT_6.latency]

/ 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 (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]

/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_7>
/inputdevice = mouse
/ ontrialbegin = [values.trialcode = "AAT_7"]
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_7.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_7.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_7.responsey < values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_7.responsey > values.mouse_y)]

/ ontrialend = [if (trial.AAT_7.correct) values.sumRTcorrect_7 += trial.AAT_7.latency]
/ ontrialend = [values.sumRT_7 += trial.AAT_7.latency]

/ontrialend = [if (trial.AAT_7.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_7.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_7.responsey]

/ ontrialend = [values.RT = trial.AAT_7.latency]
/ ontrialend = [values.correct = trial.AAT_7.correct]
/ ontrialend = [values.stimulus = picture.targetstimulus.currentitem]

/ontrialend = [if (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]
/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>


<trial AAT_8>
/ 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 = (mousemove)
/isvalidresponse = [(trial.AAT_8.responsey > (values.mouse_y + values.pixeltolerance)) ||
(trial.AAT_8.responsey < (values.mouse_y - values.pixeltolerance)) ]
/ iscorrectresponse = [(values.expcondition == 1 && trial.AAT_8.responsey > values.mouse_y) ||
(values.expcondition == 2 && trial.AAT_8.responsey < values.mouse_y)]

/ontrialend = [if (trial.AAT_8.responsey < values.mouse_y) values.response = 1 else values.response = 2]
/ ontrialend = [values.mouse_change = abs(values.mouse_y - trial.AAT_8.responsey)]
/ ontrialend = [values.mouse_y = trial.AAT_8.responsey]

/ ontrialend = [if (trial.AAT_8.correct) values.sumRTcorrect_8 += trial.AAT_8.latency]
/ ontrialend = [values.sumRT_8 += trial.AAT_8.latency]

/ 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 (values.response == 1) values.initialresponse = "PUSH"
else values.initialresponse = "PULL"]

/ branch = [if (values.response == 1) trial.decrease else trial.increase]
/recorddata = false
</trial>

<trial decrease>
/inputdevice = mouse
/ ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height - values.mouse_change/(values.maxheight/2) * expressions.maxheightchange_px]

/ stimulusframes = [1 = eraser, targetstimulus]
/validresponse = (mousemove)
/ontrialend = [values.mouse_change = abs(values.mouse_y - trial.decrease.responsey)]

/ontrialend = [trial.decrease.resetstimulusframes()]

/branch = [if (script.subjectid == "monkey") {values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.intertrialinterval}]

/branch = [if (trial.decrease.responsey <= 1)
{values.mouse_y = trial.decrease.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PUSH"; trial.enddecrease}]
/branch = [if (trial.decrease.responsey <= values.mouse_y)
{values.mouse_y = trial.decrease.responsey; trial.decrease}]
/branch = [if (trial.decrease.responsey > values.mouse_y)
{values.mouse_y = trial.decrease.responsey; values.changedirection += 1; trial.increase}]

/ recorddata = false
</trial>


<trial increase>
/ ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height + values.mouse_change/(values.maxheight/2) * expressions.maxheightchange_px]
/ stimulusframes = [1 = targetstimulus]
/validresponse = (mousemove)
/ontrialend = [values.mouse_change = abs(values.mouse_y - trial.increase.responsey)]

/ontrialend = [trial.increase.resetstimulusframes()]

/branch = [if (script.subjectid == "monkey") {values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.intertrialinterval}]

/branch = [if (trial.increase.responsey >= values.maxheight-1)
{values.mouse_y = trial.increase.responsey; values.endtime = script.elapsedtime; values.finalresponse = "PULL"; trial.endincrease}]
/branch = [if (trial.increase.responsey >= values.mouse_y)
{values.mouse_y = trial.increase.responsey; trial.increase}]
/branch = [if (trial.increase.responsey < values.mouse_y)
{values.mouse_y = trial.increase.responsey; values.changedirection += 1; trial.decrease}]
/recorddata = false
</trial>

<trial endincrease>
/ ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height + values.mouse_change/(values.maxheight/2) * expressions.maxheightchange_px]
/stimulusframes = [1 = targetstimulus]
/timeout = 0
/branch = [trial.intertrialinterval]
/recorddata = false
</trial>

<trial enddecrease>
/ontrialbegin = [picture.targetstimulus.height = picture.targetstimulus.height - values.mouse_change/(values.maxheight/2) * expressions.maxheightchange_px]
/stimulusframes = [1 = eraser, targetstimulus]
/timeout = 0
/branch = [trial.intertrialinterval]
/recorddata = false
</trial>


<trial InterTrialInterval>
/ontrialbegin = [values.completeRT= values.endtime - values.starttime]
/ stimulusframes = [1 = eraser]
/ timeout = values.intertrialinterval
/ recorddata = true
</trial>


<block AAT>
/preinstructions = (taskinstructions)
/ onblockbegin = [values.index = 0]
/ trials = [1-80 = AAT_start]
</block>


<expt >
/ onexptbegin = [values.expcondition = 1]
/ onexptbegin = [values.format1 = "PORTRAIT"; values.format2 = "LANDSCAPE"]
/ subjects = (1 of 2)
/groupassignment = groupnumber
/ onexptbegin = [values.startheight_A = values.Startheight_ratioA*values.maxheight]
/ onexptbegin = [values.startheight_B = values.Startheight_ratioB* values.maxheight]
/ blocks = [1 = SequenceGenerator; 2 = AAT]
/ postinstructions = (End)
/onexptend = [values.completed = 1]
</expt>

<expt >
/ onexptbegin = [values.expcondition = 2]
/ onexptbegin = [values.format2 = "PORTRAIT"; values.format1 = "LANDSCAPE"]
/ subjects = (2 of 2)
/groupassignment = groupnumber
/ onexptbegin = [values.startheight_A = values.Startheight_ratioA*values.maxheight]
/ onexptbegin = [values.startheight_B = values.Startheight_ratioB*values.maxheight]
/ blocks = [1 = SequenceGenerator; 2 = AAT]
/ postinstructions = (End)
/onexptend = [values.completed = 1]
</expt>


<values>
/count1 = 10
/count2 = 10
/count3 = 10
/count4 = 10
/count5 = 10
/count6 = 10
/count7 = 10
/count8 = 10
/runcount_1 = 0
/runcount_2 = 0
/runcount_3 = 0
/runcount_4 = 0
/runcount_A = 0
/runcount_B = 0
/newnumber = 0
/count_comparecat = 0
/count_compareformat = 0
/sequence = ""
/index = 0
</values>


<list stimcats>
/ items = (
1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,
8,8,8,8,8,8,8,8,8,8)
/ replace = false
</list>


<trial selectnumber>
/ ontrialbegin = [values.newnumber = list.stimcats.nextvalue]
/ ontrialbegin = [values.index += 1]
/ ontrialbegin = [if (values.newnumber == 1)
{values.runcount_1 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_A;
values.count1 -=1}]
/ ontrialbegin = [if (values.newnumber ==2)
{values.runcount_1 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_1;
values.count_compareformat = values.runcount_B;
values.count2 -=1}]
/ ontrialbegin = [if (values.newnumber ==3)
{values.runcount_2 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_A;
values.count3 -= 1}]
/ ontrialbegin = [if (values.newnumber ==4)
{values.runcount_2 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_2;
values.count_compareformat = values.runcount_B;
values.count4 -=1}]
/ ontrialbegin = [if (values.newnumber ==5)
{values.runcount_3 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_A;
values.count5 -= 1}]
/ ontrialbegin = [if (values.newnumber ==6)
{values.runcount_3 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_3;
values.count_compareformat = values.runcount_B;
values.count6 -= 1}]
/ ontrialbegin = [if (values.newnumber == 7)
{values.runcount_4 += 1;
values.runcount_A += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_A;
values.count7 -= 1}]
/ ontrialbegin = [if (values.newnumber ==8)
{values.runcount_4 += 1;
values.runcount_B += 1;
values.count_comparecat = values.runcount_4;
values.count_compareformat = values.runcount_B;
values.count8 -= 1}]

/ontrialend = [if (values.count_comparecat < 4 && values.count_compareformat < 4)
{ values.sequence = concat(values.sequence, values.newnumber)}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 1)
{ values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0;
trial.selectnumber}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 2)
{ values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0;
trial.selectnumber}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 3)
{ values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_B = 0;
trial.selectnumber}]

/ branch = [if (values.index <= values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 4)
{ values.runcount_1 = 0; values.runcount_3 = 0; values.runcount_4 = 0; values.runcount_A = 0;
trial.selectnumber}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 5)
{ values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_B = 0;
trial.selectnumber}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 6)
{ values.runcount_2 = 0; values.runcount_1 = 0; values.runcount_4 = 0; values.runcount_A = 0;
trial.selectnumber}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 7)
{ values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_B = 0;
trial.selectnumber}]

/ branch = [if (values.index < values.totaltrialcount && values.count_comparecat < 4 && values.count_compareformat < 4 && values.newnumber == 8)
{ values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_1 = 0; values.runcount_A = 0;
trial.selectnumber}]

/branch = [if (values.newnumber == 1 && values.count_comparecat > 3 &&
(values.count3 != 0 || values.count4 != 0 || values.count5 != 0 || values.count6 != 0 || values.count7 != 0 || values.count8 != 0))
{values.index -= 1; list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_a -= 1; values.count1 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 1 && values.count_compareformat > 3 &&
(values.count2 != 0 || values.count4 != 0 || values.count6 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(1, 1); values.runcount_1 -= 1; values.runcount_a -= 1; values.count1 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 2 && values.count_comparecat > 3 &&
(values.count3 != 0 || values.count4 != 0 || values.count5 != 0 || values.count6 != 0 || values.count7 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_b -= 1; values.count2 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 2 && values.count_compareformat > 3 &&
(values.count1 != 0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0))
{values.index -= 1;list.stimcats.insertitem(2, 1); values.runcount_1 -= 1; values.runcount_b -= 1; values.count2 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 3 && values.count_comparecat > 3 &&
(values.count1 != 0 || values.count2 != 0 || values.count5 != 0 || values.count6 != 0 || values.count7 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_a -= 1; values.count3 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 3 && values.count_compareformat > 3 &&
(values.count2 != 0 || values.count4 != 0 || values.count6 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(3, 1); values.runcount_2 -= 1; values.runcount_a -= 1; values.count3 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 4 && values.count_comparecat > 3 &&
(values.count1 != 0 || values.count2 != 0 || values.count5 != 0 || values.count6 != 0 || values.count7 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_b -= 1; values.count4 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 4 && values.count_compareformat > 3 &&
(values.count1 != 0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0))
{values.index -= 1;list.stimcats.insertitem(4, 1); values.runcount_2 -= 1; values.runcount_b -= 1; values.count4 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 5 && values.count_comparecat > 3 &&
(values.count3 != 0 || values.count4 != 0 || values.count1 != 0 || values.count2 != 0 || values.count7 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_a -= 1; values.count5 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 5 && values.count_compareformat > 3 &&
(values.count2 != 0 || values.count4 != 0 || values.count6 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(5, 1); values.runcount_3 -= 1; values.runcount_a -= 1; values.count5 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 6 && values.count_comparecat > 3 &&
(values.count3 != 0 || values.count4 != 0 || values.count1 != 0 || values.count2 != 0 || values.count7 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_b -= 1; values.count6 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 6 && values.count_compareformat > 3 &&
(values.count1 != 0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0))
{values.index -= 1;list.stimcats.insertitem(6, 1); values.runcount_3 -= 1; values.runcount_b -= 1; values.count6 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 7 && values.count_comparecat > 3 &&
(values.count3 != 0 || values.count4 != 0 || values.count1 != 0 || values.count2 != 0 || values.count5 != 0 || values.count6 != 0))
{values.index -= 1;list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_a -= 1; values.count7 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 7 && values.count_compareformat > 3 &&
(values.count2 != 0 || values.count4 != 0 || values.count6 != 0 || values.count8 != 0))
{values.index -= 1;list.stimcats.insertitem(7, 1); values.runcount_4 -= 1; values.runcount_a -= 1; values.count7 += 1; trial.selectnumber}]

/branch = [if (values.newnumber == 8 && values.count_comparecat > 3 &&
(values.count3 != 0 || values.count4 != 0 || values.count1 != 0 || values.count2 != 0 || values.count5 != 0 || values.count5 != 0))
{values.index -= 1;list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_b -= 1; values.count8 += 1; trial.selectnumber}]
/branch = [if (values.newnumber == 8 && values.count_compareformat > 3 &&
(values.count1 != 0 || values.count3 != 0 || values.count5 != 0 || values.count7 != 0))
{values.index -= 1;list.stimcats.insertitem(8, 1); values.runcount_4 -= 1; values.runcount_b -= 1; values.count8 += 1; trial.selectnumber}]

/branch = [if (values.count_comparecat > 3 || values.count_compareformat > 3)
{values.sequence = "";
values.index = 0;
values.runcount_1 = 0; values.runcount_2 = 0; values.runcount_3 = 0; values.runcount_4 = 0;
values.runcount_A = 0; values.runcount_B = 0;
values.count1 = 10; values.count2 = 10; values.count3 = 10; values.count4 = 10; values.count5 = 10; values.count6 = 10; values.count7 = 10; values.count8 = 10;
list.stimcats.reset(); trial.selectnumber}]

/timeout = 0
/recorddata = false
</trial>


<text completesequence>
/ items = ("<%values.sequence%>")
</text>

<trial showsequence>
/ inputdevice = keyboard
/ stimulusframes = [1 = completesequence]
/ validresponse = (57)
</trial>


<text wait>
/items = ("Please wait; we'll be ready shortly")
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 0)
</text>

<block SequenceGenerator>
/ bgstim = (wait)
/ trials = [1 = selectnumber]
/ recorddata = false
</block>

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K
#1: Remove the stimuli you don't want from the <item> element.

#2: Adjust the <values> entries
<values>
/count1 = 10
/count2 = 10
/count3 = 10
/count4 = 10
/count5 = 10
/count6 = 10
/count7 = 10
/count8 = 10
...
</values>

accordingly. They represent the number of items in each of the 8 stimulus categories.

#3: Adjust the item index numbers in the <list> elements <list category1> to <list category8> accordingly. You have removed items in step #1, i.e. the new item numbers are now different and the lists need to reflect that.

#4: Adjust
<values >
/totaltrialcount = 80
...
</values>

accordingly. Fewer items means fewer trials.

#5: Adjust <list stimcats> accordingly. There are now fewer items in each category.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 103K
See the attached file for further reference.

Attachments
AAT_short.iqx (935 views, 26.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search