Visual search task - to have response options drawn from the same array presented before it


Author
Message
Hannah_Razak
Hannah_Razak
Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)Expert (1K reputation)
Group: Forum Members
Posts: 6, Visits: 53
Hi everyone!

I'm trying to set up a visual search task and would greatly appreciate some help with a few codes.

The sequence of events for the task are :

(1st screen) Fixation
(2nd screen) Presentation of a target within a randomized array consisting of 2,4 or 8 items  & items remain on screen until participants respond "Yes" or "No" to having seen a target by pressing one of two keys on the keyboard
(3rd screen) Participants prompted to identify the previous location of the target - by having the exact same array presented in the 2nd screen appear with simply blank boxes

I have gotten everything else running perfectly well but I am having some troubles getting the right code for the 3rd screen - that is to get the 3rd screen to present the exact same array that was presented in the previous screen.

If it helps, I have included the codes I have for my sequence of trials.

I would absolutely value any help if anyone has set up a visual search task similar to this before.

Thanks in advance!

Codes:

(1st screen - FIXATION)

<trial fixation>
/stimulusframes = [1 = fixation]
/timeout = values.fixationduration
/branch = [if (values.expcondition == 0) {values.setsize = 8; trial.targetpresent8}]
/branch = [if (values.expcondition == 0) {values.setsize = 8; trial.targetabsent8}]
/recorddata = false
/errormessage = false
</trial>


(2nd screen - TARGET PRESENTED IN ARRAY)

<trial targetpresent8>
/ontrialbegin = [values.trialtype = "targetpresent"]
/ontrialbegin = [values.selectdistractor7 = list.distractor_itemnumber.nextindex]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, "Distractor1: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor1)]
/ontrialbegin = [values.distractor_x1 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y1 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Distractor2: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor2)]
/ontrialbegin = [values.distractor_x2 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y2 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Distractor3: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor3)]
/ontrialbegin = [values.distractor_x3 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y3 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Distractor4: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor4)]
/ontrialbegin = [values.distractor_x4 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y4 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Distractor5: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor5)]
/ontrialbegin = [values.distractor_x5 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y5 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Distractor6: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor6)]
/ontrialbegin = [values.distractor_x6 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y6 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Distractor7: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.selectdistractor7)]
/ontrialbegin = [values.distractor_x7 = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.distractor_y7 = expressions.ycenter + list.y_coordinates_pictures.nextvalue]
/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, ", Target: ")]
/ontrialbegin= [values.stimulilocations = concat(values.stimulilocations, picture.target.currentitemnumber)]
/ontrialbegin = [values.target = picture.target.currentitem]

/ontrialbegin = [values.pictureposition = list.pictureposition.nextvalue]
/ontrialbegin= [values.stimulilocations = concat(values.stimulilocations, ", Position: ")]
/ontrialbegin = [values.stimulilocations = concat(values.stimulilocations, values.pictureposition)]

/ontrialbegin = [values.target_x = expressions.xcenter + list.x_coordinates_pictures.nextvalue]
/ontrialbegin = [values.target_y = expressions.ycenter + list.y_coordinates_pictures.nextvalue]

/stimulusframes = [1 = fixation, distractor1, distractor2, distractor3, distractor4, distractor5, distractor6, distractor7, target]

/isvalidresponse = [trial.targetpresent8.response == values.responsekey_targetabsent || trial.targetpresent8.response == values.responsekey_targetpresent]
/iscorrectresponse = [trial.targetpresent8.response == values.responsekey_targetpresent]

/monkeyresponse = (21, 49)
/ontrialend = [if (trial.targetpresent8.correct) {values.hit = 1; values.responsetype = "Hit"} else {values.miss = 1; values.responsetype = "Miss"}]
/branch = [trial.targetlocation]

</trial>

I have also included "target absent" trials as catch trials with very similar codes - for example - the only difference to the above code is that 8 distractors are selected to be presented rather that 7 


(3rd screen - TARGET LOCATION)

<trial targetlocation>

/stimulusframes = [1 = targetlocationinstructions]
/isvalidresponse = [trial.targetlocation.response == values.responsekey_targetlocationup || trial.targetlocation.response == values.responsekey_targetlocationdown]
/monkeyresponse = (72, 80)
/iscorrectresponse = [trial.targetlocation.response == values.responsekey_targetlocationup || trial.targetlocation.response == values.responsekey_targetlocationdown]

/ontrialend = [if (trial.targetlocation.correct) {values.hit = 1; values.responsetype = "Location Recorded"} else {values.miss = 1; values.responsetype = "No Location Recorded"}]

/ontrialend = [if (trial.targetpresent8.correct && (values.pictureposition == 1 || values.pictureposition == 2 || values.pictureposition == 3 || values.pictureposition == 8) && values.responsekey_targetlocationup)
{values.responsetype = "Correct location identified"} else {values.responsetype = "Incorrect location identified"}]
/ontrialend = [if (trial.targetpresent8.correct && (values.pictureposition == 4 || values.pictureposition == 5 || values.pictureposition == 6 || values.pictureposition == 7) && values.responsekey_targetlocationdown)
{values.responsetype = "Correct location identified"} else {values.responsetype = "Incorrect location identified"}]

/ontrialend = [if (trial.targetabsent8.correct) {values.responsetype = "No location target absent"}]

/recorddata = true
/branch = [trial.end]

Here, I only have a screen asking participants where they thought the location was and to press one of two keys to indicate an "Bottom half" or "Top half" response.

</trial>





GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic

Explore
Messages
Mentions
Search