Group: Forum Members
Posts: 2,
Visits: 12
|
Hello,
I'm programming a variation of a Posner Spatial Cuing Task and I'm having some trouble with randomizing images. I have four conditions, each with 76 images, that are displayed on the left or the right side of the screen followed by a probe that displays on the left or right side of the screen. I want the images to be randomly presented, presented on the left for 38 times and on the right for 38 times, and the probe to be random as well. I currently have some script but need to know how to do random no-replace for the picture, picture's side, and the probes position or what else I'm doing wrong.
Here's my code for the picture: <list WIfaces> /items = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76) / replace = false </list>
for the probe's position: <list WIfacestargetpositions> /items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2) / selectionmode = list.WIfaces.currentindex </list>
for the probe's congruence: <list WIfacestargetcongruence> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2) / selectionmode = list.WIfaces.currentindex </list>
and one of my condition's trial: <trial WIfaces> / ontrialbegin = [values.valid = 0; values.validcorrect = 0; values.trialcount += 1; values.category="WIfaces"] / ontrialbegin = [values.itemnumber = list.WIfaces.nextvalue] / ontrialbegin = [values.target_position = list.wifacestargetpositions.nextvalue] / ontrialbegin = [values.congruence = list.WIfacestargetcongruence.nextvalue]
/ ontrialbegin = [if (values.target_position == 1) {values.target_x = values.target_left_x} else {values.target_x = values.target_right_x; values.comp_x = values.target_left_x}] / ontrialbegin = [if (values.congruence == 1) {values.probe_x = values.target_x} else {values.probe_x = values.comp_x}]
/ ontrialbegin = [trial.WIfaces.insertstimulustime(shape.eraser, values.fixationduration)] / ontrialbegin = [trial.WIfaces.insertstimulustime(picture.WIfaces, values.fixationduration)] / ontrialbegin = [trial.WIfaces.insertstimulustime(shape.eraser, (values.fixationduration + values.targetduration))] / ontrialbegin = [trial.WIfaces.insertstimulustime(text.probe, (values.fixationduration + values.targetduration + values.TP_isi))] / ontrialend = [trial.WIfaces.resetstimulusframes()] / stimulusframes = [1 = fixation] / beginresponsetime = values.fixationduration + values.targetduration + values.TP_ISI / responseinterrupt = immediate / isvalidresponse = [trial.WIfaces.response == values.responsekey_left || trial.WIfaces.response == values.responsekey_right] / iscorrectresponse = [(values.probe_x == values.target_left_x && trial.WIfaces.response == values.responsekey_left) || (values.probe_x == values.target_right_x && trial.WIfaces.response == values.responsekey_right)] / monkeyresponse = (18, 23) / ontrialend = [values.target_image = picture.WIfaces.currentitem]
/ ontrialend = [if (trial.WIfaces.latency >= values.minimum_latency) values.valid = 1] / ontrialend = [if (values.valid == 1 && trial.WIfaces.correct) values.validcorrect = 1] / ontrialend = [if (values.validcorrect == 1) {values.sumcorrect += 1; values.sumrt += trial.WIfaces.latency}] / ontrialend = [if (values.congruence == 1) values.count_congruent_WIfaces += 1 else values.count_incongruent_WIfaces += 1] / ontrialend = [if (values.validcorrect == 1 && values.congruence == 1) {values.sumcorrect_congruent_WIfaces += 1; values.sumrt_congruent_WIfaces += trial.WIfaces.latency}] / ontrialend = [if (values.validcorrect == 1 && values.congruence == 2) {values.sumcorrect_incongruent_WIfaces += 1; values.sumrt_incongruent_WIfaces += trial.WIfaces.latency}]
/ timeout = (values.fixationduration + values.targetduration + values.TP_ISI+ values.probeduration) / posttrialpause = values.iti </trial>
Thank you for your help!
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
<list WIfacestargetpositions> /items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2) / selectionmode = list.WIfaces.currentindex </list>
<list WIfacestargetcongruence> / items = (1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2) / selectionmode = list.WIfaces.currentindex </list>
Those dependencies do not make sense. list.Wlfaces has 76 items. The two lists above have only 10 items and 11 items respectively. Suppose the 42nd item in list.Wlfaces is selected at random: What should those lists above return? They don't have anything corresponding to the 42nd item that they could give you.
I also don't understand why you would *want* the probe's position and congruence to be tied to the *specific face item* selected. It seems to me that one would usually want those things to be separate. I.e., you'd want 38 x the value 1 in <list WIfacestargetpositions> and 38 x the value 2. You'll want to sample from that list *randomly*. You'll then want to have the 2nd list -- <list WIfacestargetcongruence> -- depend on the selection in the 1st (position) list. The 2nd list, of course, ought to also contain a total of 76 items, ordered as needed.
<list WIfacestargetpositions> /items = ( 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ) / selectionmode = random </list>
<list WIfacestargetcongruence> /items = ( 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ) / selectionmode = list.WIfacestargetpositions.currentindex </list>
Beyond that there isn't much I can say -- the code excerpt you posted does not include various key parts.
|