Modified visual dot probe question


Author
Message
Joel Cavallo
Joel Cavallo
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 36, Visits: 87

Hello,
I'm new to Inquisit and I was wondering if someone could help me modify the Alcohol dot probe task (from the task library). In brief, I am trying to change the probe from an "X" to a classification type probe that has either a circle picture or a square picture. As it stands right now, I have modified the alcohol dot probe to include 4 categories of pictures. There are 2 target pictures (ocean and mountain) and 2 distracter filler pictures (prairie tree and laketree). For all 4 of these categories, I am trying to make the probe randomly appear behind one of the images (just like a normal probe), in either the left or right position. I have pasted my entire code below for reference, but at this point, I was thinking about adding:
<picture probe>
/items = probeimage
/select = values.itemnumber
/hposition = values.probe_x
vposition = values.probe_y
/size = (values.imagewidth, values.imageheight)
</picture>

<item probeimage>
/1 = "circle.bmp"
/2 = "square.bmp"

That's about as far as I have gotten. My next instinct was to modify the <trial probe_PIOP> but I'm not sure what to add. PIOP stands for probe in ocean position, and PIMP, stands which stands for probe in mountain position. Any help would be greatly appreciated. Thank you in advance.

-Joel
Below is the code:

Editable Values
********************************************
*******************************************************
/fixationduration/targetduration:    the duration of the fixation cross (default: 500ms)/the targets (default: 1000ms)/
/probeduration:         the duration of the probe presentation (default: 1000ms)

/fixation_posttrialpause :      the posttrialpauses for the fixation crosses/the targets/the probe
/target_posttrialpause/probe_posttrialpause: (by default they are all = 0)
/probe:           the symbol used for the probe (default: X)
/responsekey_left-responsekey_right:   the keyboard scancodes associated with left probe and right probe
/responsekey_left_label:      responsekey labels
/minimum_latency:        the minimum latency of a correct response that is included into summary variables
            (default: 100ms)

Physical Settings of Display:     Note: change the settings to optimize the display on your computer screen
/target_left_x-target_right_x:     the x-coordinate in % of the right/left target (default: 33%, 67%)
/target_y:          the y-coordinate of the target (default: center at 50%)
/fixationcross_height:       the height of the fixation cross (default: 5%)
/probe_height:         the height of the probe (default: 5%)
/imagewidth:         the width of the image (default: 20%)
/imageheight:         the height of the image (default: 20%)

<values>
/fixationduration = 500
/targetduration = 2000
/probeduration = 1000
/fixation_posttrialpause = 0
/target_posttrialpause = 0
/probe_posttrialpause = 0
/probe = "X"
/responsekey_left = 44
/responsekey_right = 53
/responsekey_left_label = "z"
/responsekey_right_label = "?"
/minimum_latency = 100

/target_left_x = 27%
/target_right_x = 73%
/target_y = 50%
/fixationcross_height = 5%
/probe_height = 5%
/imagewidth = 40%
/imageheight = 40%
</values>

*******************************************************
********************************************
Editable Instructions
********************************************
*******************************************************
<instruct>
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
/windowsize = (90%, 90%)
/ finishlabel = "Press <Spacebar> to continue"
/ nextkey = (57)
/nextlabel = "Press <Spacebar> to continue"
/prevkey = (28)
/prevlabel = "Press <Enter> to go back"
</instruct>

Note: the main instructions were generously provided by Dr. Fillmore. Customize below.

<page instructions>
This is a reaction time task.

^^Please place the index and middle fingers of your right hand on the <%values.responsekey_left_label%> and <%values.responsekey_right_label%> keys.
You will be presented with a fixation point at the center of the screen followed by a pair of images. These images are of various objects.
You are to look at and focus on both of the pictures while they are on the screen. Do not focus in the center.
You will need to move your eyes back and forth to focus on each of the pictures while they are on the screen. 
Once the images disappear from the screen, an X will appear on either the left or right side of the screen.
^^Your task is to respond as quickly as possible to the X by pressing the <%values.responsekey_left_label%> key if the X is on the left side of the screen
or the <%values.responsekey_right_label%> key if the X is on the right side of the screen.
Once you respond to the X, another fixation point will appear followed by the presentation of a new set of images. You will perform several of these trials.

^^Any questions? Are you ready to begin? Please keep your attention on the computer screen and remember to respond as quickly as possible.

^^^Please press the spacebar key to begin some practice.

</page>

<page practice>
Practice is over. If you have any questions, please ask your experimenter now.
^^^^When you are ready, continue on to the actual task. The actual task is like practice but there is not going to be any feedback.

^^^^^^^^^^^^^Please press the spacebar key to begin.
</page>

<page thankyou>
Thank you for your participation!
</page>

*******************************************************
********************************************
Editable Stimuli: original stimuli generously shared by Dr. Fillmore
********************************************
*******************************************************
Note:
itemnumbers 1-10: simple pictures
Note: itemnumbers 11-20 could contain complex pictures (itemnumbers > 10
would then always distinguish between simple and complex pictures)

<item oceanimage>
/1 = "ocean.jpg"
/2 = "ocean.jpg"
/3 = "ocean.jpg"
/4 = "ocean.jpg"
/5 = "ocean.jpg"
/6 = "ocean.jpg"
/7 = "ocean.jpg"
/8 = "ocean.jpg"
/9 = "ocean.jpg"
/10 = "ocean.jpg"
</item>

<item mountainimage>
/1 = "mountain.jpg"
/2 = "mountain.jpg"
/3 = "mountain.jpg"
/4 = "mountain.jpg"
/5 = "mountain.jpg"
/6 = "mountain.jpg"
/7 = "mountain.jpg"
/8 = "mountain.jpg"
/9 = "mountain.jpg"
/10 = "mountain.jpg"
</item>

<item fillerimages1>
/1 = "prairietree.jpg"
/2 = "prairietree.jpg"
/3 = "prairietree.jpg"
/4 = "prairietree.jpg"
/5 = "simple filler 5a.jpg"
/6 = "simple filler 6a.jpg"
/7 = "simple filler 7a.jpg"
/8 = "simple filler 8a.jpg"
/9 = "simple filler 9a.jpg"
/10 = "simple filler 10a.jpg"
</item>

<item fillerimages2>
/1 = "laketree.jpg"
/2 = "laketree.jpg"
/3 = "laketree.jpg"
/4 = "laketree.jpg"
/5 = "simple filler 5b.jpg"
/6 = "simple filler 6b.jpg"
/7 = "simple filler 7b.jpg"
/8 = "simple filler 8b.jpg"
/9 = "simple filler 9b.jpg"
/10 = "simple filler 10b.jpg"
</item>
*******************************************************************************************************************
*******************************************************************************************************************
DEFAULTS
*******************************************************************************************************************
*******************************************************************************************************************
requires Inquisit 4.0.3.0 or higher

<defaults>
/minimumversion = "4.0.3.0"
/ fontstyle = ("Arial", 3%, false, false, false, false, 5, 1)
/ txcolor = (white)
/txbgcolor = (black)
/screencolor = black
/canvasaspectratio = (4,3)
</defaults>

*******************************************************************************************************************
*******************************************************************************************************************
VALUES
*******************************************************************************************************************
*******************************************************************************************************************

********************
automatically updated
********************
/itemnumber:          itemnumber of currently selected picture
/selecteditem:          helper variable to determine itemnumber
/ocean_x-probe_x:         the y-coordinate (in %) of the ocean/mountain/probe
/mountainimage:          stores the currently presented mountain image (or pseudo mountain image)
/oceanimage:          stores the currently presented ocean image (or pseudo ocean image)
/oceanposition:          1 = ocean image on right; 2 = ocean image on left
/congruence:          0 = filler; 1 = probe and ocean position same; 2 = probe and ocean position different

Summary Variables: only for ocean and mountain pictures (not for filler1/filler2 pictures = filler stimuli)
/sum_correct:          counts the correct responses >= values.minimum_latency (here: 100ms)

/sum_correct_probeinoceanposition_simple:   counts the correct responses to probes in the ocean position/probes in the mountain position
/sum_correct_probeinmountainposition_simple:  for responses >= values.minimum_latency (simple pictures)

/sumrt_probeinoceanposition_simple:     adds up the latencies for CORRECT responses when the probe is in the ocean/mountain position
/sumrt_probeinmountainposition_simple:    and latencies >= values.minimum_latency (simple pictures)

/meanrt_probeinoceanposition_simple:    contains the mean latency for CORRECT responses when the probe is in the ocean/mountain position
/meanrt_probeinmountainposition_simple:    (simple pictures)

/sum_correct_filler:        counts all correct filler trials
/sumrt_correct_filler:        sums up all latencies of correct filler trials
/meanrt_correct_filler:        calculates the mean latency for correct responses in filler trials

/task:            1 = practice; 2 = test        

<values>
/itemnumber = 0
/selecteditem = ""
/ocean_x = 0
/mountain_x = 0
/probe_x = 0
/probe_y = 0
/mountainimage = ""
/oceanimage = ""
/oceanposition = 0
/congruence = 0

/sum_correct = 0

/sum_correct_probeinoceanposition_simple = 0
/sum_correct_probeinmountainposition_simple= 0

/sumrt_probeinoceanposition_simple = 0
/sumrt_probeinmountainposition_simple = 0

/meanrt_probeinoceanposition_simple = 0
/meanrt_probeinmountainposition_simple = 0

/sum_correct_filler = 0
/sumrt_correct_filler = 0
/meanrt_correct_filler = 0

/task = 0
</values>
*******************************************************************************************************************
*******************************************************************************************************************
EXPRESSIONS
*******************************************************************************************************************
*******************************************************************************************************************
/AB_simple:  Attentional Bias for simple pictures: If AB_simple > 0 => faster mean latencies to ocean pictures for simple pictures

<expressions>
/AB_simple = values.meanrt_probeinmountainposition_simple - values.meanrt_probeinoceanposition_simple
</expressions>


*******************************************************************************************************************
*******************************************************************************************************************
DATA
*******************************************************************************************************************
*******************************************************************************************************************
for explanations of custom values, go to VALUES/EXPRESSIONS. Customize.

********************
raw data
********************

date, time, subject:        date and time script was run with the current subject
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)
/congruence:          0 = filler; 1 = probe and ocean position same; 2 = probe and ocean position different
/oceanposition:            1 = ocean image on right; 2 = ocean image on left
/mountain_x-probe_x:         the y-coordinate (in %) of the ocean/mountain/probe
/itemnumber:          itemnumber of currently selected picture
/oceanimage:          stores the currently presented ocean image (or pseudo ocean image)
/mountainimage:          stores the currently presented mountain image (or pseudo mountain image)
response:           the participant's response (scancode of response button)
correct:           accuracy of response
latency:            the response latency
/sum_correct:          counts the correct responses >= values.minimum_latency (here: 100ms)

/meanrt_probeinoceanposition_simple:    contains the mean latency for CORRECT responses when the probe is in the ocean/mountain position
/meanrt_probeinmountainposition_simple:    (simple pictures)
/sumrt_probeinoceanposition_simple:     adds up the latencies for CORRECT responses when the probe is in the ocean/mountain position
/sumrt_probeinmountainposition_simple:    and latencies >= values.minimum_latency (simple pictures)
/sum_correct_probeinoceanposition_simple:   counts the correct responses to probes in the ocean position/probes in the mountain position
/sum_correct_probeinmountainposition_simple:   for responses >= values.minimum_latency (simple pictures)
/AB_simple:           Attentional Bias for simple pictures: If AB_simple > 0 => faster mean latencies to ocean pictures for simple pictures
/sum_correct_filler:        counts all correct filler trials
/sumrt_correct_filler:        sums up all latencies of correct filler trials
/meanrt_correct_filler:        calculates the mean latency for correct responses in filler trials


<data>
/file = "EMAC_Dot_Probe_rawdata.iqdat"
/separatefiles = true
/columns = [date, time, subject, blockcode, blocknum, trialcode, trialnum,
values.congruence, values.oceanposition,
values.mountain_x, values.ocean_x, values.probe_x,
values.itemnumber, values.oceanimage, values.mountainimage,
response, correct, latency, values.sum_correct,

values.meanrt_probeinoceanposition_simple, values.sumrt_probeinoceanposition_simple, values.sum_correct_probeinoceanposition_simple,
values.meanrt_probeinmountainposition_simple, values.sumrt_probeinmountainposition_simple, values.sum_correct_probeinmountainposition_simple,
expressions.ab_simple,
values.sum_correct_filler, values.sumrt_correct_filler, values.meanrt_correct_filler]
</data>

********************
summary data
********************

/fixationduration/targetduration:    the duration of the fixation cross (default: 500ms)/the targets (default: 2000ms)/
/probeduration:         the duration of the probe presentation (default: 1000ms)

/fixation_posttrialpause :      the posttrialpauses for the fixation crosses/the targets/the probe
/target_posttrialpause/probe_posttrialpause: (by default they are all = 0)
/probe:           the symbol used for the probe (default: X)
/responsekey_left-responsekey_right:   the keyboard scancodes associated with left probe and right probe
/responsekey_left_label:      responsekey labels
/minimum_latency:        the minimum latency of a correct response that is included into summary variables
             (default: 100ms)

/sum_correct:          counts the correct responses >= values.minimum_latency (here: 100ms)

/meanrt_probeinoceanposition_simple:    contains the mean latency for CORRECT responses when the probe is in the ocean/mountain position
/meanrt_probeinmountainposition_simple:    (simple pictures)
/sumrt_probeinoceanposition_simple:     adds up the latencies for CORRECT responses when the probe is in the ocean/mountain position
/sumrt_probeinmountainposition_simple:    and latencies >= values.minimum_latency (simple pictures)
/sum_correct_probeinoceanposition_simple:   counts the correct responses to probes in the ocean position/probes in the mountain position
/sum_correct_probeinmountainposition_simple:  for responses >= values.minimum_latency (simple pictures)
/AB_simple:           Attentional Bias for simple pictures: If AB_simple > 0 => faster mean latencies to ocean pictures for simple pictures
/sum_correct_filler:        counts all correct filler trials
/sumrt_correct_filler:        sums up all latencies of correct filler trials
/meanrt_correct_filler:        calculates the mean latency for correct responses in filler trials


<summarydata >
/file = "EMAC_DotProbe_summary.iqdat"
/columns = [script.startdate, script.starttime, script.subjectid,
values.fixationduration, values.targetduration, values.probeduration,
values.fixation_posttrialpause, values.target_posttrialpause, values.probe_posttrialpause, values.minimum_latency,
values.sum_correct,
values.meanrt_probeinoceanposition_simple, values.sumrt_probeinoceanposition_simple, values.sum_correct_probeinoceanposition_simple,
values.meanrt_probeinmountainposition_simple, values.sumrt_probeinmountainposition_simple, values.sum_correct_probeinmountainposition_simple,
expressions.ab_simple,
values.sum_correct_filler, values.sumrt_correct_filler, values.meanrt_correct_filler]
</summarydata>

 
*******************************************************************************************************************
*******************************************************************************************************************
STIMULI
*******************************************************************************************************************
*******************************************************************************************************************
<picture oceanimage>
/items = oceanimage
/select = values.itemnumber
/hposition = values.ocean_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

<picture mountainimage>
/items = mountainimage
/select = values.itemnumber
/hposition = values.mountain_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

<picture filleroceanimage>
/items = fillerimages1
/select = values.itemnumber
/hposition = values.ocean_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

<picture fillermountainimage>
/items = fillerimages2
/select = values.itemnumber
/hposition = values.mountain_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>
******************************
other stimuli
******************************
<text fixation>
/items = ("+")
/position = (50%, 50%)
/ fontstyle = ("Arial", values.fixationcross_height, false, false, false, false, 5, 1)
</text>

<text probe>
/items = ("<%values.probe%>")
/hposition = values.probe_x
/vposition = values.target_y
/txcolor = white
/ fontstyle = ("Arial", values.probe_height, false, false, false, false, 5, 1)
</text>

<shape eraser>
/shape = rectangle
/size = (100%, 100%)
/color = black
/position = (50%, 50%)
</shape>

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

*******************************************************************************************************************
*******************************************************************************************************************
LISTS
*******************************************************************************************************************
*******************************************************************************************************************

Note: the following lists the picture selection for the four different trial sequences
(experiment: probe in ocean/mountain position; filler: probe in 'ocean'/'mountain' position)
to ensure that each image is presented 4 times (right/left, with/without probe, NEW probe square/circle)
digits: refer to itemnumber
letter: A-> show 'ocean' picture on the right; B -> show 'ocean' picture on the left

<list PIOP_items>
/items = ("1A", "1B", "2A", "2B","3A", "3B", "4A", "4B", "5A", "5B", "6A", "6B", "7A", "7B", "8A", "8B", "9A", "9B", "10A", "10B")
/replace = false
/resetinterval = 1
</list>

<list PIMP_items>
/items = ("1A", "1B", "2A", "2B","3A", "3B", "4A", "4B", "5A", "5B", "6A", "6B", "7A", "7B", "8A", "8B", "9A", "9B", "10A", "10B")
/replace = false
/resetinterval = 1
</list>

<list filler_PIOP_items>
/items = ("1A", "1B", "2A", "2B","3A", "3B", "4A", "4B", "5A", "5B", "6A", "6B", "7A", "7B", "8A", "8B", "9A", "9B", "10A", "10B")
/replace = false
/resetinterval = 1
</list>

<list filler_PIMP_items>
/items = ("1A", "1B", "2A", "2B","3A", "3B", "4A", "4B", "5A", "5B", "6A", "6B", "7A", "7B", "8A", "8B", "9A", "9B", "10A", "10B")
/replace = false
/resetinterval = 1
</list>
*******************************************************************************************************************
*******************************************************************************************************************
EXPERIMENTAL TRIALS: pairs of ocean images - mountain images
*******************************************************************************************************************
*******************************************************************************************************************

********************************************
Probe in Ocean Position (PIOP) : Trial Sequence
********************************************

Note: trial.fixation_PIOP
1) presents the fixation stimulus in the center of the screen
2) calls trial.targets_PIOP
3) does not record any data (by default)
<trial fixation_PIOP>
/ontrialbegin = [values.congruence = 1]
/stimulusframes = [1 = eraser, fixation]
/timeout = values.fixationduration
/branch = [trial.targets_PIOP]
/posttrialpause = values.fixation_posttrialpause
/recorddata = false
</trial>

Note: trial.targets_PIOP
1) determines the itemnumber of the current image and whether to show it right or left
2) presents the two images for a set amount of time (values.targetduration)
3) calls trial.probe_PIOP
4) does not record any data (by default)
<trial targets_PIOP>
/ontrialbegin = [values.selecteditem = list.PIOP_items.nextvalue]
/ontrialbegin = [if (values.selecteditem == "1A") {values.itemnumber = 1; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "1B") {values.itemnumber = 1; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "2A") {values.itemnumber = 2; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "2B") {values.itemnumber = 2; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "3A") {values.itemnumber = 3; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "3B") {values.itemnumber = 3; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "4A") {values.itemnumber = 4; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "4B") {values.itemnumber = 4; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "5A") {values.itemnumber = 5; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "5B") {values.itemnumber = 5; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "6A") {values.itemnumber = 6; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "6B") {values.itemnumber = 6; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "7A") {values.itemnumber = 7; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "7B") {values.itemnumber = 7; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "8A") {values.itemnumber = 8; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "8B") {values.itemnumber = 8; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "9A") {values.itemnumber = 9; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "9B") {values.itemnumber = 9; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "10A") {values.itemnumber = 10; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "10B") {values.itemnumber = 10; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/stimulusframes = [1 = oceanimage, mountainimage]

/ontrialend = [values.oceanimage = picture.oceanimage.currentitem; values.mountainimage = picture.mountainimage.currentitem]
/timeout = values.targetduration
/posttrialpause = values.target_posttrialpause
/branch = [trial.probe_PIOP]
/recorddata = false
</trial>


Note: trial.probe_PIOP
1. the position of the current probe
2. presents the probe in the ocean position for max. 1000ms (after that a new trialsequence is started)
3. updates several measures
4. records the relevant data into the data file
<trial probe_PIOP>
/ontrialbegin = [values.probe_x = values.ocean_x]
/stimulusframes = [1 = probe]
/isvalidresponse = [trial.probe_PIOP.response == values.responsekey_left || trial.probe_PIOP.response == values.responsekey_right]
/monkeyresponse = (44, 53)
/iscorrectresponse = [(values.probe_x == values.target_left_x  && trial.probe_PIOP.response == values.responsekey_left) ||
     (values.probe_x == values.target_right_x && trial.probe_PIOP.response == values.responsekey_right) ]
 
/ontrialend = [if (trial.probe_PIOP.correct && trial.probe_piop.latency >= values.minimum_latency) {
    values.sum_correct += 1;
    values.sum_correct_probeinoceanposition_simple += 1;
    values.sumrt_probeinoceanposition_simple += trial.probe_PIOP.latency;
    values.meanrt_probeinoceanposition_simple = values.sumrt_probeinoceanposition_simple/values.sum_correct_probeinoceanposition_simple}]

/timeout = (values.probeduration)
/branch = [if (values.task == 1 && trial.probe_PIOP.error) trial.feedback else trial.intertrialinterval]
</trial>

********************************************
Probe in Mountain Position (PIMP) : Trial Sequence
********************************************

Note: trial.fixation_PIMP
1) presents the fixation stimulus in the center of the screen
2) calls trial.targets_PIMP
3) does not record any data (by default)
<trial fixation_PIMP>
/ontrialbegin = [values.congruence = 2]
/stimulusframes = [1 = eraser, fixation]
/timeout = values.fixationduration
/branch = [trial.targets_PIMP]
/posttrialpause = values.fixation_posttrialpause
/recorddata = false
</trial>

Note: trial.targets_PIMP
1) determines the itemnumber of the current image and whether to show it right or left
2) presents the two images for a set amount of time (values.targetduration)
3) calls trial.probe_PIMP
4) does not record any data (by default)
<trial targets_PIMP>
/ontrialbegin = [values.selecteditem = list.pimp_items.nextvalue]
/ontrialbegin = [if (values.selecteditem == "1A") {values.itemnumber = 1; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "1B") {values.itemnumber = 1; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "2A") {values.itemnumber = 2; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "2B") {values.itemnumber = 2; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "3A") {values.itemnumber = 3; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "3B") {values.itemnumber = 3; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "4A") {values.itemnumber = 4; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "4B") {values.itemnumber = 4; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "5A") {values.itemnumber = 5; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "5B") {values.itemnumber = 5; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "6A") {values.itemnumber = 6; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "6B") {values.itemnumber = 6; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "7A") {values.itemnumber = 7; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "7B") {values.itemnumber = 7; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "8A") {values.itemnumber = 8; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "8B") {values.itemnumber = 8; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "9A") {values.itemnumber = 9; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "9B") {values.itemnumber = 9; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "10A") {values.itemnumber = 10; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "10B") {values.itemnumber = 10; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/stimulusframes = [1 = oceanimage, mountainimage]
/ontrialend = [values.oceanimage = picture.oceanimage.currentitem; values.mountainimage = picture.mountainimage.currentitem]
/timeout = values.targetduration
/posttrialpause = values.target_posttrialpause
/branch = [trial.probe_PIMP]
/recorddata = false
</trial>

Note: trial.probe_PIMP
1. determines the position of the current probe
2. presents the probe in the mountain position
3. updates several measures
4. records the relevant data into the data file
<trial probe_PIMP>
/ontrialbegin = [values.probe_x = values.mountain_x]
/stimulusframes = [1 = probe]
/isvalidresponse = [trial.probe_PIMP.response == values.responsekey_left || trial.probe_PIMP.response == values.responsekey_right]
/monkeyresponse = (44, 53)
/iscorrectresponse = [(values.probe_x == values.target_left_x  && trial.probe_PIMP.response == values.responsekey_left) ||
     (values.probe_x == values.target_right_x && trial.probe_PIMP.response == values.responsekey_right) ]
 
/ontrialend = [if (trial.probe_PIMP.correct && trial.probe_PIMP.latency >= values.minimum_latency) {
    values.sum_correct += 1;
    values.sum_correct_probeinmountainposition_simple += 1;
    values.sumrt_probeinmountainposition_simple += trial.probe_PIMP.latency;
    values.meanrt_probeinmountainposition_simple = values.sumrt_probeinmountainposition_simple/values.sum_correct_probeinmountainposition_simple}]

/timeout = (values.probeduration)
/branch = [if (values.task == 1 && trial.probe_PIMP.error) trial.feedback else trial.intertrialinterval]
</trial>
*******************************************************************************************************************
*******************************************************************************************************************
FILLER TRIALS: same as experimental trials except with filler item pairs (neutral-neutral pairings)
*******************************************************************************************************************
*******************************************************************************************************************

********************************************
Probe in "Pseudoocean" Position (PIOP) : Trial Sequence

because there is no ocean in the filler trials
one item of the filler pairs is considered
a pseudo-ocean for the purpose of this script
********************************************

Note: trial.fixation_filler_PIOP
1) presents the fixation stimulus in the center of the screen
2) calls trial.targets_PIOP
3) does not record any data (by default)
<trial fixation_filler_PIOP>
/ontrialbegin = [values.congruence = 0]
/stimulusframes = [1 = eraser, fixation]
/timeout = values.fixationduration
/branch = [trial.targets_filler_PIOP]
/posttrialpause = values.fixation_posttrialpause
/recorddata = false
</trial>

Note: trial.targets_filler_PIOP
1) determines the itemnumber of the current image and whether to show it right or left
2) presents the two images for a set amount of time (values.targetduration)
3) calls trial.probe_filler_PIOP
4) does not record any data (by default)
<trial targets_filler_PIOP>
/ontrialbegin = [values.selecteditem = list.filler_PIOP_items.nextvalue]
/ontrialbegin = [if (values.selecteditem == "1A") {values.itemnumber = 1; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "1B") {values.itemnumber = 1; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "2A") {values.itemnumber = 2; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "2B") {values.itemnumber = 2; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "3A") {values.itemnumber = 3; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "3B") {values.itemnumber = 3; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "4A") {values.itemnumber = 4; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "4B") {values.itemnumber = 4; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "5A") {values.itemnumber = 5; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "5B") {values.itemnumber = 5; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "6A") {values.itemnumber = 6; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "6B") {values.itemnumber = 6; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "7A") {values.itemnumber = 7; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "7B") {values.itemnumber = 7; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "8A") {values.itemnumber = 8; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "8B") {values.itemnumber = 8; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "9A") {values.itemnumber = 9; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "9B") {values.itemnumber = 9; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "10A") {values.itemnumber = 10; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "10B") {values.itemnumber = 10; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/stimulusframes = [1 = filleroceanimage, fillermountainimage]

/ontrialend = [values.oceanimage = picture.filleroceanimage.currentitem; values.mountainimage = picture.fillermountainimage.currentitem]
/timeout = values.targetduration
/posttrialpause = values.target_posttrialpause
/branch = [trial.probe_filler_PIOP]
/recorddata = false
</trial>


Note: trial.probe_filler_PIOP
1. the position of the current probe
2. presents the probe in the ocean position
3. updates several measures
4. records the relevant data into the data file
<trial probe_filler_PIOP>
/ontrialbegin = [values.probe_x = values.ocean_x]
/stimulusframes = [1 = probe]
/isvalidresponse = [trial.probe_filler_PIOP.response == values.responsekey_left || trial.probe_filler_PIOP.response == values.responsekey_right]
/monkeyresponse = (44, 53)
/iscorrectresponse = [(values.probe_x == values.target_left_x  && trial.probe_filler_PIOP.response == values.responsekey_left) ||
     (values.probe_x == values.target_right_x && trial.probe_filler_PIOP.response == values.responsekey_right) ]
/ontrialend = [if (trial.probe_filler_PIOP.correct && trial.probe_filler_PIOP.latency >= values.minimum_latency) {
    values.sum_correct_filler += 1;
    values.sumrt_correct_filler += trial.probe_filler_PIOP.latency;
    values.meanrt_correct_filler = values.sumrt_correct_filler/values.sum_correct_filler}]

/timeout = (values.probeduration)
/branch = [if (values.task == 1 && trial.probe_filler_PIOP.error) trial.feedback else trial.intertrialinterval]
</trial>

********************************************
Probe in Mountain Position (PIMP) : Trial Sequence
********************************************

Note: trial.fixation_filler_PIMP
1) presents the fixation stimulus in the center of the screen
2) calls trial.targets_filler_PIMP
3) does not record any data (by default)
<trial fixation_filler_PIMP>
/ontrialbegin = [values.congruence = 0]
/stimulusframes = [1 = eraser, fixation]
/timeout = values.fixationduration
/branch = [trial.targets_filler_PIMP]
/posttrialpause = values.fixation_posttrialpause
/recorddata = false
</trial>


Note: trial.targets_filler_PIMP
1) determines the itemnumber of the current image and whether to show it right or left
2) presents the two images for a set amount of time (values.targetduration)
3) calls trial.probe_filler_PIMP
4) does not record any data (by default)
<trial targets_filler_PIMP>
/ontrialbegin = [values.selecteditem = list.filler_pimp_items.nextvalue]
/ontrialbegin = [if (values.selecteditem == "1A") {values.itemnumber = 1; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "1B") {values.itemnumber = 1; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "2A") {values.itemnumber = 2; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "2B") {values.itemnumber = 2; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "3A") {values.itemnumber = 3; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "3B") {values.itemnumber = 3; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "4A") {values.itemnumber = 4; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "4B") {values.itemnumber = 4; values.oceanposition = 2; values.ocean_x = values.target_left_x;values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "5A") {values.itemnumber = 5; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "5B") {values.itemnumber = 5; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "6A") {values.itemnumber = 6; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "6B") {values.itemnumber = 6; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "7A") {values.itemnumber = 7; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "7B") {values.itemnumber = 7; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "8A") {values.itemnumber = 8; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "8B") {values.itemnumber = 8; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "9A") {values.itemnumber = 9; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "9B") {values.itemnumber = 9; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "10A") {values.itemnumber = 10; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "10B") {values.itemnumber = 10; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/stimulusframes = [1 = filleroceanimage, fillermountainimage]

/ontrialend = [values.oceanimage = picture.filleroceanimage.currentitem; values.mountainimage = picture.fillermountainimage.currentitem]
/timeout = values.targetduration
/posttrialpause = values.target_posttrialpause
/branch = [trial.probe_filler_PIMP]
/recorddata = false
</trial>

Note: trial.probe_filler_PIMP
1. determines the position of the current probe
2. presents the probe in the pseudo-mountain position
3. updates several measures
4. records the relevant data into the data file
<trial probe_filler_PIMP>
/ontrialbegin = [values.probe_x = values.mountain_x]
/stimulusframes = [1 = probe]
/isvalidresponse = [trial.probe_filler_PIMP.response == values.responsekey_left || trial.probe_filler_PIMP.response == values.responsekey_right]
/monkeyresponse = (44, 53)
/iscorrectresponse = [(values.probe_x == values.target_left_x  && trial.probe_filler_PIMP.response == values.responsekey_left) ||
     (values.probe_x == values.target_right_x && trial.probe_filler_PIMP.response == values.responsekey_right) ]

/ontrialend = [if (trial.probe_filler_PIMP.correct && trial.probe_filler_PIMP.latency >= values.minimum_latency) {
    values.sum_correct_filler += 1;
    values.sumrt_correct_filler += trial.probe_filler_PIMP.latency;
    values.meanrt_correct_filler = values.sumrt_correct_filler/values.sum_correct_filler}]

/timeout = (values.probeduration)
/branch = [if (values.task == 1 && trial.probe_filler_PIMP.error) trial.feedback else trial.intertrialinterval]
</trial>

********************************************
Miscelleneous trials
********************************************
<trial feedback>
/stimulusframes = [1 = feedback]
/timeout = 500
/recorddata = false
/branch = [trial.intertrialinterval]
</trial>

<trial intertrialinterval>
/timeout = values.probe_posttrialpause
/recorddata = false
</trial>
*******************************************************************************************************************
*******************************************************************************************************************
EXPERIMENTAL BLOCKS
*******************************************************************************************************************
*******************************************************************************************************************
Note:
* presents 10 practice trials (see Miller & Fillmore, 2010)
<block Practice>
/onblockbegin = [values.task = 1]
/postinstructions = (practice)
/trials = [1-10 = noreplace(fixation_PIOP, fixation_PIMP, fixation_filler_PIOP, fixation_filler_PIMP)]
</block>

Note: presents 160 trials, randomly samples from all 4 conditions
<block EMACDotProbeTask>
/onblockbegin = [values.task = 2]
/onblockbegin = [values.sum_correct = 0;
 values.sum_correct_probeinoceanposition_simple = 0;
 values.sum_correct_probeinmountainposition_simple= 0;

 values.sumrt_probeinoceanposition_simple = 0;
 values.sumrt_probeinmountainposition_simple = 0;

 values.meanrt_probeinoceanposition_simple = 0;
 values.meanrt_probeinmountainposition_simple = 0;

 values.sum_correct_filler = 0;
 values.sumrt_correct_filler = 0;
 values.meanrt_correct_filler = 0]

/trials = [1-80 = noreplace(fixation_PIOP, fixation_PIMP, fixation_filler_PIOP, fixation_filler_PIMP)]
</block>

*******************************************************************************************************************
*******************************************************************************************************************
EXPERIMENT
*******************************************************************************************************************
*******************************************************************************************************************
<expt >
/preinstructions = (instructions)
/postinstructions = (thankyou)
/blocks = [1 = Practice; 2 = EMACDotProbeTask]
</expt>

Note: debug element
<monkey>
/ latencydistribution = normal(300, 50)
</monkey>

*******************************************************************************************************************
End of File
*******************************************************************************************************************



 


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: 12K, Visits: 98K
<trial probe_filler_PIOP>
...
/stimulusframes = [1 = probe]
...
</trial>

is supposed to display a stimulus element called 'probe'. If you want it to display the <picture probe> element you included in your initial query, you must (a) add that to the script (it isn't there in the "full" code you pasted) and (b) remove the original <text probe> element. Otherwise, how would the software know which one of the two stimulus elements called 'probe' you actually mean?


Whether you'll want to use values.itemnumber for probe selection, I cannot tell. Lots of elements in your script use that value

<picture oceanimage>
/items = oceanimage
/select = values.itemnumber
/hposition = values.ocean_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

<picture mountainimage>
/items = mountainimage
/select = values.itemnumber
/hposition = values.mountain_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

<picture filleroceanimage>
/items = fillerimages1
/select = values.itemnumber
/hposition = values.ocean_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

<picture fillermountainimage>
/items = fillerimages2
/select = values.itemnumber
/hposition = values.mountain_x
/vposition = values.target_y
/size = (values.imagewidth, values.imageheight)
</picture>

and you can see how that value is determined by looking at your /ontrialbegin attributes

<trial targets_PIOP>
/ontrialbegin = [values.selecteditem = list.PIOP_items.nextvalue]
/ontrialbegin = [if (values.selecteditem == "1A") {values.itemnumber = 1; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "1B") {values.itemnumber = 1; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "2A") {values.itemnumber = 2; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "2B") {values.itemnumber = 2; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "3A") {values.itemnumber = 3; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "3B") {values.itemnumber = 3; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "4A") {values.itemnumber = 4; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "4B") {values.itemnumber = 4; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "5A") {values.itemnumber = 5; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "5B") {values.itemnumber = 5; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "6A") {values.itemnumber = 6; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "6B") {values.itemnumber = 6; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "7A") {values.itemnumber = 7; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "7B") {values.itemnumber = 7; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "8A") {values.itemnumber = 8; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "8B") {values.itemnumber = 8; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "9A") {values.itemnumber = 9; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "9B") {values.itemnumber = 9; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "10A") {values.itemnumber = 10; values.oceanposition = 1; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "10B") {values.itemnumber = 10; values.oceanposition = 2; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
...
</trial>

Clearly, (a) it's not strictly randomly determined and more importantly (b) it can take on values 1-10, which does not make sense for the probe (it only has two items, not ten).

Hope this clarifies.

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: 12K, Visits: 98K
P.S.: I personal request, if I may. If possible, please do not paste full scripts into a post's body. Instead use the forum's file attachment facilities to provide the entire, original script file. Thank you!

Joel Cavallo
Joel Cavallo
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 36, Visits: 87
OK, sorry about that. I will do so in the future. Also, thanks for your tips, I will try out a few things and get back to you.
-Joel
Joel Cavallo
Joel Cavallo
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 36, Visits: 87

Alright, so I have completed the first round of edits based on your advice. I have two more questions. 1) How do I randomize the presentation of the pictures and the probe (position and type)?

2) How do I clarify what a valid response is for this task under <trial probe_PIOP>? Originally, the response was correct if the participant clicked a left/right key when the probe was behind the left/right picture. Now, I am asking participants to press the "z" key if the probe was a square and the "?" key if it was a circle. The items that I have modifed are listed below and the script is attached. Thank you so much!

-Joel

I have now defined:

<item probeimage>
/1 = "circle.jpg"
/2 = "square.jpg"

I have also added:
<values>
/probenumber = 1

I have also added:
<list probe_items>
/items = ("1A", "1B", "2A", "2B")
/replace = true
/resetinterval = 1
</list>

I have also modified:
 <trial probe_PIOP>
/ontrialbegin = [values.selecteditem = list.probe_items.nextvalue]

I have modified this trial so that 1A = circle left, 1B = square left, 2A = circle right, 2B = square right.


Attachments
EMACversion3circlesquareprobe.iqx (830 views, 52.00 KB)
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: 12K, Visits: 98K
Re. #1:
<picture probe>
/items = probeimage
/select = values.probenumber
/hposition = values.probe_x
/vposition = values.target_y

/size = (values.imagewidth, values.imageheight)
</picture>

You've set the stimulus's position up to depend on the values highlighted above.

Again, how does values are determined, you can discern by examining your /ontrialbegin attributes:
<trial probe_PIOP>
/ontrialbegin = [values.selecteditem = list.probe_items.nextvalue]
/ontrialbegin = [if (values.selecteditem == "1A") {values.probenumber = 1; values.oceanposition = 1; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "1B") {values.probenumber = 2; values.oceanposition = 1; values.ocean_x = values.target_left_x; values.mountain_x = values.target_right_x}]
/ontrialbegin = [if (values.selecteditem == "2A") {values.probenumber = 1; values.oceanposition = 2; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [if (values.selecteditem == "2B") {values.probenumber = 2; values.oceanposition = 2; values.ocean_x = values.target_right_x; values.mountain_x = values.target_left_x}]
/ontrialbegin = [values.probe_x = values.ocean_x]
...
</trial>

A random item is drawn from the highlighted <list>, the remaining values depend on that item.


Re. #2:
The method is exactly the same as before. The correct response is determined via the logic in the <trial>'s /iscorrectresponse attribute(s):

/iscorrectresponse = [(values.probe_x == values.target_left_x  && trial.probe_PIOP.response == values.responsekey_left) ||
                    (values.probe_x == values.target_right_x && trial.probe_PIOP.response == values.responsekey_right) ]

You need to adapt / extend that logic to reflect the specific probe item (circle vs square), i.e. via /ontrialbegin you'll want to set the applicable responsekey value to either the keyboard scancode for "?" or "Z" depending on the probe item selected.

Joel Cavallo
Joel Cavallo
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 36, Visits: 87
Hello,
Thank you again for all of your help yesterday. I've made excellent progress based on your comments, but I'm still stuck on how to get the correct response key associated with the type of probe presented. Previously, the code for this program was written so that the correct response would be either Left or Right key presses (keys 51 and 52). The code was:
[(values.probe_x == values.target_left_x && trial.probe_PIOP.response == values.responsekey_left)]

Now, I am trying to make it so that when probenumber = 1, then the correct response is 53, and when probenumber = 2, then the correct key press is 44. I have modified these key values to correspond to values.responsekey_left and right. I have also tried changing the logic to the "iscorrect" function as you suggested, but it is still not working. The code I have inserted is:

[(values.probenumber == 2 && trial.probe_PIOP.response == values.responsekey_left)]
[(values.probenumber == 1 && trial.probe_PIOP.response == values.responsekey_right)]

I'm not entierly sure what you meant by modify the /ontrial section to include the correct response keys. I thought that these were set intitially in the values section and the logic would appear in the specific trials. Any help would be appreciated to iron out this logic function. Thank you in advance.

-Joel

Attachments
EMACver4.iqx (785 views, 55.00 KB)
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: 12K, Visits: 98K
What I mean, schematically, is to do

<trial sometrial>
...
/ ontrialbegin = [if (values.probenumber == 1) values.responsekey_left=insert_appropriate_scancode_here]
/ ontrialbegin = [if (values.probenumber == 2) values.responsekey_left=insert_appropriate_scancode_here]
...
</trial>
and so forth for the right response key.

Joel Cavallo
Joel Cavallo
Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)Distinguished Member (3.8K reputation)
Group: Forum Members
Posts: 36, Visits: 87
Hello,
Thank you for the response. Quick question, if I add the:
/ontrialbegin [if(values.probenumber ==2) values.responsekey_left = 44]

Then is my subsequent logic correct?:
/iscorrectresponse = [(values.probenumber == 2  && trial.probe_PIOP.response == values.responsekey_left)

Thank you.

-Joel

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: 12K, Visits: 98K
I would think so, but of course cannot tell with absolute certainty based only on a little code snippet. You should be able to test this for yourself very quickly, though, since the data file will reveal if the response was recorded / evaluated / scored as you intended. Or is there something I'm missing?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search