creating fixed picture locations for different trial types


Author
Message
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: 104K
#1: You don't need any <item> element. Forget about that.
#2: The poolsize is wrong.

The list doesn't need to "hold all positions". All it needs to hold is something that *identifies* a given position uniquely -- i.e., a number between 1 and 48 (inclusive).

Look back at https://www.millisecond.com/forums/FindPost17196.aspx and notice that we've abstracted positions to numerical identifiers (1 to 4) in the example.

For now focus *solely* on sampling 12 random numbers from one list and storing them in another.

Edited 9 Years Ago by Dave
charlottebooth
charlottebooth
Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)Guru (5.2K reputation)
Group: Forum Members
Posts: 45, Visits: 249
Thanks! So is this in any way correct:

<picture targets>
/items = targets
/select = list.newtargets.nextvalue
/vposition = values.targety
/hposition = values.targetx
/size = (3%, 3%)
</picture>

<list newtargets>
</list>

<list targetpositions>
/poolsize = 48
/selectionrate = always
</list>


<expt CC>
/blocks = [1=experimental]
/onexptbegin = [list.newtargets.appenditem(list.targetpositions.nextindex);
                         list.newtargets.appenditem(list.targetpositions.nextindex); 
                        list.newtargets.appenditem(list.targetpositions.nextindex);
                        list.newtargets.appenditem(list.targetpositions.nextindex); ..... etc. x12
</expt>



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: 104K
<expt CC>
/blocks = [1=experimental]
/onexptbegin = [list.newtargets.appenditem(list.targetpositions.nextindex);
                         list.newtargets.appenditem(list.targetpositions.nextindex); 
                        list.newtargets.appenditem(list.targetpositions.nextindex);
                        list.newtargets.appenditem(list.targetpositions.nextindex); ..... etc. x12
</expt>

The above is correct. But

<picture targets>
/items = targets
/select = list.newtargets.nextvalue
/vposition = values.targety
/hposition = values.targetx
/size = (3%, 3%)
</picture>

is *not* what you want. You don't want the target *item* selected according to what's in the newtargets list. You want the *position* selected. I.e., in the "new" <trial>, sample a value from list.newtargets. Store it in a <values> entry. Set values.targetx and values.targety to the coordinates *corresponding* to the numerical position indicator you sampled from list.newtargets.

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: 104K
This example summarizes where we are and puts the various pieces so far together.

<values>
/ targetpos = 0
/ targetx = 0
/ targety = 0

/ d1pos = 0
/ d1x = 0
/ d1y = 0

/ d2pos = 0
/ d2x = 0
/ d2y = 0

/ d3pos = 0
/ d3x = 0
/ d3y = 0

/ d4pos = 0
/ d4x = 0
/ d4y = 0

/ d5pos = 0
/ d5x = 0
/ d5y = 0

/ d6pos = 0
/ d6x = 0
/ d6y = 0

/ d7pos = 0
/ d7x = 0
/ d7y = 0

/ d8pos = 0
/ d8x = 0
/ d8y = 0

/ d9pos = 0
/ d9x = 0
/ d9y = 0

/ d10pos = 0
/ d10x = 0
/ d10y = 0

/ d11pos = 0
/ d11x = 0
/ d11y = 0

/ jitterstep = 1%
</values>

<expt>
/ onexptbegin = [list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
    list.targetpositionsnew.appenditem(list.allpositions.nextindex);
]
/ blocks = [1-4 = taskblock]
</expt>

<page blockstartpage>
^start of new block
</page>


<block taskblock>
/ preinstructions = (blockstartpage)
/ trials = [1-12=newtrial]
</block>

<trial newtrial>
/ ontrialbegin = [list.distractorpositionsnew.reset(); text.target.textcolor=red; ]
/ ontrialbegin = [values.targetpos=list.targetpositionsnew.nextvalue;
    values.targetx=list.x.item(values.targetpos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.targety=list.y.item(values.targetpos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d1pos=list.distractorpositionsnew.nextvalue;
    values.d1x=list.x.item(values.d1pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d1y=list.y.item(values.d1pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d2pos=list.distractorpositionsnew.nextvalue;
    values.d2x=list.x.item(values.d2pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d2y=list.y.item(values.d2pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d3pos=list.distractorpositionsnew.nextvalue;
    values.d3x=list.x.item(values.d3pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d3y=list.y.item(values.d3pos)+(values.jitterstep*list.randomjitter.nextvalue);
   
    values.d4pos=list.distractorpositionsnew.nextvalue;
    values.d4x=list.x.item(values.d4pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d4y=list.y.item(values.d4pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d5pos=list.distractorpositionsnew.nextvalue;
    values.d5x=list.x.item(values.d5pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d5y=list.y.item(values.d5pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d6pos=list.distractorpositionsnew.nextvalue;
    values.d6x=list.x.item(values.d6pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d6y=list.y.item(values.d6pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d7pos=list.distractorpositionsnew.nextvalue;
    values.d7x=list.x.item(values.d7pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d7y=list.y.item(values.d7pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d8pos=list.distractorpositionsnew.nextvalue;
    values.d8x=list.x.item(values.d8pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d8y=list.y.item(values.d8pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d9pos=list.distractorpositionsnew.nextvalue;
    values.d9x=list.x.item(values.d9pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d9y=list.y.item(values.d9pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d10pos=list.distractorpositionsnew.nextvalue;
    values.d10x=list.x.item(values.d10pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d10y=list.y.item(values.d10pos)+(values.jitterstep*list.randomjitter.nextvalue);

    values.d11pos=list.distractorpositionsnew.nextvalue;
    values.d11x=list.x.item(values.d11pos)+(values.jitterstep*list.randomjitter.nextvalue);
    values.d11y=list.y.item(values.d11pos)+(values.jitterstep*list.randomjitter.nextvalue);
    ]
/ pretrialpause = 500
/ stimulusframes =  [1=target,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11]
/ validresponse = (57)
</trial>

<text target>
/ items = ("T1", "T2")
/ hposition = values.targetx
/ vposition = values.targety
</text>

<text d1>
/ items = distractoritems
/ hposition = values.d1x
/ vposition = values.d1y
</text>

<text d2>
/ items = distractoritems
/ hposition = values.d2x
/ vposition = values.d2y
</text>

<text d3>
/ items = distractoritems
/ hposition = values.d3x
/ vposition = values.d3y
</text>

<text d4>
/ items = distractoritems
/ hposition = values.d4x
/ vposition = values.d4y
</text>

<text d5>
/ items = distractoritems
/ hposition = values.d5x
/ vposition = values.d5y
</text>

<text d6>
/ items = distractoritems
/ hposition = values.d6x
/ vposition = values.d6y
</text>

<text d7>
/ items = distractoritems
/ hposition = values.d7x
/ vposition = values.d7y
</text>

<text d8>
/ items = distractoritems
/ hposition = values.d8x
/ vposition = values.d8y
</text>

<text d9>
/ items = distractoritems
/ hposition = values.d9x
/ vposition = values.d9y
</text>

<text d10>
/ items = distractoritems
/ hposition = values.d10x
/ vposition = values.d10y
</text>

<text d11>
/ items = distractoritems
/ hposition = values.d11x
/ vposition = values.d11y
</text>

<item distractoritems>
/ 1 = "L1"
/ 2 = "L2"
/ 3 = "L3"
/ 4 = "L4"
</item>


<list allpositions>
/ poolsize = 48
/ selectionrate = always
</list>

<list targetpositionsnew>
</list>

<list distractorpositionsnew>
/ 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)
/ not = (values.targetpos)
/ selectionrate = always
</list>

<list randomjitter>
/ items = (-3,-2,-1, 1, 2, 3)
/ selectionrate = always
/ selectionmode = random
/ replace = true
</list>

<list x>
/ items = (6.25%, 18.75%, 31.25%, 43.75%, 56.25%, 68.75%, 81.25%, 93.75%,
    6.25%, 18.75%, 31.25%, 43.75%, 56.25%, 68.75%, 81.25%, 93.75%,
    6.25%, 18.75%, 31.25%, 43.75%, 56.25%, 68.75%, 81.25%, 93.75%,
    6.25%, 18.75%, 31.25%, 43.75%, 56.25%, 68.75%, 81.25%, 93.75%,
    6.25%, 18.75%, 31.25%, 43.75%, 56.25%, 68.75%, 81.25%, 93.75%,
    6.25%, 18.75%, 31.25%, 43.75%, 56.25%, 68.75%, 81.25%, 93.75%)
</list>

<list y>
/ items = (8.33%, 8.33%, 8.33%, 8.33%, 8.33%, 8.33%, 8.33%, 8.33%,
    25.00%, 25.00%, 25.00%, 25.00%, 25.00%, 25.00%, 25.00%, 25.00%,
    41.67%, 41.67%, 41.67%, 41.67%, 41.67%, 41.67%, 41.67%, 41.67%,
    58.33%, 58.33%, 58.33%, 58.33%, 58.33%, 58.33%, 58.33%, 58.33%,
    75.00%, 75.00%, 75.00%, 75.00%, 75.00%, 75.00%, 75.00%, 75.00%,
    91.67%, 91.67%, 91.67%, 91.67%, 91.67%, 91.67%, 91.67%, 91.67%)
</list>

Please work through that and make sure you understand every part of it. If there's something you don't understand, please don't hesitate to ask about those specific portions of the code. A good exercise would be to comment the code, i.e., write up short explanations of what each part does.

Then start thinking about how to tackle the "old" trials. I.e., what additional steps have to be taken to assemble those configurations.

Hope this helps.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search