Complicated linking and selection of stimuli


Author
Message
SmaugWithACamera
SmaugWithACamera
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 19, Visits: 29
Hey Dave,

now the experiment runs exactly how I hoped it would.

Thanks a lot for all your your help!

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
Yes. Set the <trial> to some short /timeout or /trialduration and -- importantly -- set the <video> elements' /playthrough attributes to 'true'.

Edited 8 Years Ago by Dave
SmaugWithACamera
SmaugWithACamera
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 19, Visits: 29
Great! Now it works exactly as I intended. :)

Thank you very much!

I have one last question regading the presentation of stimuli:

My videos differ in length so if I use a fixed trial duration I'll have problems keeping the presentation free of confoundation because either longer videos will be cut off or there will be a longer break between trials if the videos are shorter.
Is it possible if you have one defined trial that is applied to a pool of videos to let it play out the video and then automatically move on when it's completed or is this kind of dynamic video stimulus presentation impossible?


<trial lernen_b>
/ ontrialbegin = [values.vid2 = list.vid_b_itemnumbers.nextvalue; ]
/stimulusframes = [1 = maske, fixation; 66 = vid_b_item]
/trialduration = 3000 (<--- dummy value as 3000 is too short for any video)
/recorddata = true
/ontrialend = [values.datei = (video.vid_b_item.currentitem)]
</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
Thank you for sharing the files. Turns out this was my boneheaded mistake from the get-go. The final /onexptbegin statement after setting up the lists

<expt>
...
/ onexptbegin = [list.learningitemnumbers.reset(); ]
...
</expt>

ought to actually read

<expt>
...
/ onexptbegin = [list.learningitemnumbers.resetselection(); ]
...
</expt>

in this case to work properly. reset() would not only reset selection, but also return the <list> to its initial (empty) state. Which of course doesn't make any sense here. Sorry about that.

SmaugWithACamera
SmaugWithACamera
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 19, Visits: 29
Hey Dave,

sure no problem. I've put the whole script and the picture files into a dropbox folder:

https://www.dropbox.com/sh/2qw2xezx3xixwyd/AACUR7r6RJquOxQ_icgJ2eaMa?dl=0

Thanks again!

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
I am not sure how to answer this without (a) being able to see the current state of the actual code and (b) access to the actual image files. Please be so kind and provide both (please do not include the videos). Thanks.

SmaugWithACamera
SmaugWithACamera
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 19, Visits: 29
Hey Dave!

Thank you very much for the explanation! Now it makes sense to me.

The problem still remains though, even after defining values. :unsure: Inquisit still puts out the error I screencapped earlier. (I don't know if it tries to tell me that there is an "undefined" 0th item or if <pictures learningitem> is completely empty. Either way Inquisit can't access it but apparently the other <picture>/<video> elements are fine, even though they are programmed the same way if I'm not mistaken.)

Sorry, I know this is really tedious...

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
values are what you know as global variables in other programming languages. You set them to some value and they keep that value until you set them to something else (e.g. a new item number sampled from a <list>).

They are initialized with a value equal to one in this cases because *files* are involved -- i.e., there can be no such thing as a "zero-th" or "null" item in <picture> or <video> elements. That wouldn't map to any actual file and you'd get an error.

SmaugWithACamera
SmaugWithACamera
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)
Group: Forum Members
Posts: 19, Visits: 29
Hey Dave,

sorry to get back so soon but I haven't worked with values before and have admittedly no understanding of them so I was unsure what to really do after the ... part in
<values>
/ learningitem = 1
...
</values>

I tried this:

<values>
/learn = 1
/vid1 = 1
/vid2 = 1
/distr = 1
</values>

<picture learningitem>
/items = Bilder
/ select = values.learn
/ size = (75%, 75%)
</picture>

<picture distractoritem>
/items = Bilder
/ select = values.distr
/ size = (75%, 75%)
</picture>

<video vid_a_item>
/items = Videos_A
/ select = values.vid1
/ size = (75%, 75%)
</video>

<video vid_b_item>
/items = Videos_B
/ select = values.vid2
/ size = (75%, 75%)
</video>

and inserted the /ontrialbegin line into every trial but the afore-mentioned error still remains.
(Example:
<trial lernen_a>
/ ontrialbegin = [values.vid1 = list.vid_a_itemnumbers.nextvalue; ] )


Since I don't understand the mechanism of values (and the manual is a bit scarce in its explaination) I didn't really know what else I could alter so I have to come back here without any further progress.
(E.g. I don't understand why you set it to 1 because in the manual all examples are set to 0.)
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
> / onexptbegin = [list.learningitemnumbers.reset(); ]

Is necessary. When you set up the video lists /onexptbegin you *sample* several items -- but not all items --  from list.learningitemnumbers. I.e., once that's done there are a few *unsampled* items left in the list.

Since you want *all* items to be available when the respective trials actually start, the list needs to be reset. Otherwise, the list would sample the (here: 2) unsampled items first, and then reset midway through the experiment because the list ran out of items. That would make *all its* items (here: 6) available again, including the 2 already used.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search