random 4 out of 10 images in each trial


Author
Message
piotr_styrkowiec
piotr_styrkowiec
Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)
Group: Forum Members
Posts: 39, Visits: 183
I'm stuck with the following thing: There are 10 images. Each image is a jpg file of a small white circle, each image has its own onscreen position (no other image got this position).In each trial I want random 4 circles to be displayed on the screen.How can I get it? It's probably very easy though I cannot figure it out...
Will be grateful for any help.Piotr 
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
<block myblock>
/ trials = [1-5 = mytrial]
</block>

<trial mytrial>
/ ontrialend = [list.imagelist.reset(); ]
/ stimulusframes = [1=img1, img2, img3, img4]
...
</trial>

<picture img1>
/ items = imageitems
/ select = list.imagelist.nextindex
...
</picture>
...
<picture img4>
/ items = imageitems
/ select = list.imagelist.nextindex
...
</picture>

<list imagelist>
/ poolsize = 10
/ selectionrate = always
</list>

<item imageitems>
/ 1 = "circle1.jpg"
...
/ 10 = "circle10.jpg"
</item>

piotr_styrkowiec
piotr_styrkowiec
Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)
Group: Forum Members
Posts: 39, Visits: 183
It looks fine, but there is one problem.The onscreen position of each image is not set within the jpg file.It is set in the picture element for each object, this is:

< picture circle_1>
/ items = ("circle_1.jpg")
/ vposition = 5
/ hposition = 5
</picture>

<picture circle_1>
/ items = ("circle_2.jpg")
/ vposition = 10
/ hposition = 10<
/picture>
...
<picture circle_10>
/ items = ("circle_10.jpg")
/ vposition = 95
/ hposition = 95
</picture> 

How should I implement these picture elements in item element in order to use it in the list element?
Is it possible?
If no, is there any other way I can get 4 random pictures out of 10 pictures (such as presented just above) in each 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
You can define two additional list elements (one for hposition, one for vposition) and link them to the 1st list. EDITED Here's a full example with <text> elements (it works the same for <picture>s):

<block myblock>
/ trials = [1-10 = mytrial]
</block>

<trial mytrial>
/ ontrialend = [list.mylist.reset(); ]
/ stimulusframes = [1=txt1, txt2, txt3, txt4]
/ validresponse = (57)
</trial>

<text txt1>
/ items = myitems
/ select = list.mylist.nextindex
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text txt2>
/ items = myitems
/ select = list.mylist.nextindex
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text txt3>
/ items = myitems
/ select = list.mylist.nextindex
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<text txt4>
/ items = myitems
/ select = list.mylist.nextindex
/ hposition = list.hpos.nextvalue
/ vposition = list.vpos.nextvalue
</text>

<item myitems>
/ 1 = "A"
/ 2 = "B"
/ 3 = "C"
/ 4 = "D"
/ 5 = "E"
/ 6 = "F"
/ 7 = "G"
/ 8 = "H"
/ 9 = "I"
/ 10 = "J"
</item>

<list mylist>
/ poolsize = 10
/ selectionrate = always
</list>

<list hpos>
/ items = (5%,10%,15%,20%,25%,75%,80%,85%,90%,95%)
/ selectionmode = list.mylist.currentindex
/ selectionrate = always
</list>

<list vpos>
/ items = (5%,10%,15%,20%,25%,75%,80%,85%,90%,95%)
/ selectionmode = list.mylist.currentindex
/ selectionrate = always
</list>


Edited 9 Years Ago by Dave
piotr_styrkowiec
piotr_styrkowiec
Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)
Group: Forum Members
Posts: 39, Visits: 183
Works perfectly!
Thank you very much Dave.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search