picture selection


Author
Message
SimonaH.
SimonaH.
Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)
Group: Forum Members
Posts: 6, Visits: 48

Hi,

I have a question on how to best programm a random selection of pictures from one pool into separate picture pools that starts at the beginning of a trial.

I have a pool of 16 pictures and at the beginning of an experiment I want them to be randomly assigned into 4 separate pools: 4 pictures per pool. These picturs will then be drawn at and presented in 4 different within design conditions (reperesnted by trials), where also other characteristics are counterbalanced (e.g. picture position).

I tried to accomplish it by creating a central list of 16 pictures and programm a very first trial of the experiment so that it randomly draws 4 pictures into one list and erases them from the central list and the same should happen for the next 3 lists. Then the lists are used as a “selection” reference in picture elements, as lists cannot be really used as “item” elements in trials etc. However, it does not seem to work well, I keep getting these errors:
“Error evaluating ´100´/: Unknown error.”
“Unable to initialze <picture xy> item number 0. Verify the item exists and its correctly defined.”

Any ideas? Thanks!

Here is my script:

<item all_central>
/1=picture1
/2=picture2
/...
/16=picture16
</item>

<picture all_central>
/ items = all_center
/select = noreplace
/ position = (50, 50)
/size = (550,600)
</picture>

<list all_central>
/ items= (all_central)
</list>

<list congruent_a>
/ items= (list.all_central)
/poolsize= 4
/selectionmode = random
</list>

<trial remove1>
/ ontrialbeginning= [list.all_central.removeitem(list.congruent_a);]
/timeout = 1
</trial>

<list incongruent_a>
/ items= (list.all_central)
/poolsize= 4
/selectionmode = random
</list>

<trial remove2>
/ ontrialend= [list.all_central.removeitem(list.incongruent_a);]
/timeout = 1
</trial>

<list congruent_b>
/ items= (list.all_central)
/poolsize= 4
/selectionmode = random
</list>

<trial remove3>
/ ontrialend= [list.all_central.removeitem(list.congruent_b);]
/timeout = 1
</trial>

<list incongruent_b>
/ items= (list.all_central)
/poolsize= 4
/selectionmode = random
</list>

<picture xyz_left_congruent_a>
/select = list.congruent_a
/ position = (25, 50)
/size = (250,300)
</picture>

<picture xyz_left_congruent_b>
/select = list.congruent_b
/ position = (25, 50)
/size = (250,300)
</picture>

<picture xyz_right_congruent_a>
/select = list.congruent_a
/ position = (75, 50)
/size = (250,300)
</picture>

<picture xyz_right_congruent_b>
/select = list.congruent_b
/ position = (75, 50)
/size = (250,300)
</picture>

<picture xyz_left_incongruent_a>
/select = list.incongruent_a
/ position = (25, 50)
/size = (250,300)
</picture>

etc..

trial example:
<trial l_congruent_left_face_a>
/inputdevice=mouse
/validresponse = ("liking_button","disliking_button")
/stimulustimes = [500=fixation_cross; 1100=face_center; 1100=xyz_left_congruent_a; 2700=facegaze_left; 3500 = x_button, y_button]
</trial>





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
Your idea is along the correct lines, your syntax is erroneous in various places.

(1) Have a master <list> containing the 16 item numbers for your 16 different pictures

(2) At the beginning of the experiment populate your 4 empty <lists> representing the 4 conditions with 4 random items from that masterlist each. There is no need to remove anything from the master list.

(3) Use the condition lists for item selection in your stimulus elements.

In a nutshell:


<expt>
/ onexptbegin = [list.a.appenditem(list.masterlist.nextindex); list.a.appenditem(list.masterlist.nextindex);
    list.b.appenditem(list.masterlist.nextindex); list.b.appenditem(list.masterlist.nextindex); ]
/ blocks = [1=ablock; 2=bblock]
</expt>

<block ablock>
/ trials = [1-2=atrial]
</block>

<block bblock>
/ trials = [1-2=btrial]
</block>

<trial atrial>
/ stimulusframes = [1=atxt]
/ validresponse = (57)
</trial>

<trial btrial>
/ stimulusframes = [1=btxt]
/ validresponse = (57)
</trial>

<list masterlist>
/ poolsize = 4
/ selectionrate = always
</list>

<list a>
</list>

<list b>
</list>

<text atxt>
/ items = myitems
/ select = list.a.nextvalue
</text>

<text btxt>
/ items = myitems
/ select = list.b.nextvalue
</text>

<item myitems>
/ 1 = "Item 1"
/ 2 = "Item 2"
/ 3 = "Item 3"
/ 4 = "Item 4"
</item>

SimonaH.
SimonaH.
Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)
Group: Forum Members
Posts: 6, Visits: 48
Hi,

thanks for the answer.

I tried to implement what you suggested (exactly), however there is still one occurring problem: I keep being presented with only the first 4 pictures from the master list over and over again (so the rest of the 16 pics does not get selected). Where could be the problem?

Simona
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
The example in my response has only 4 items, hence the <list> only has a poolsize equal to 4. For more items, you need to adjust it as needed.

<list masterlist>
/ poolsize = 16
/ selectionrate = always
</list>

You need to adjust the /onexptbegin logic accordingly as well.

SimonaH.
SimonaH.
Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)Partner Member (526 reputation)
Group: Forum Members
Posts: 6, Visits: 48
Of course, makes sense. I confused the amount of pictures in a master list, with the amount of which were supposed to be selected per list.

Now it seems to work. Thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search