[visionegg] Re: Questions re: experiment with sequenced stimuli and multiple trials
- From: Andrew Straw <astraw@xxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Fri, 08 Feb 2008 10:26:27 -0800
Doug Morse wrote:
> Hello Vision Eggers,
>
> I have a few questions about how to "best" create an experiment in Vision Egg
> (VE). Specifically, I'm implementing a motion object tracking task (MOT)
> wherein participants will be presented a number of target and distractor
> "balls" (circles in 2D, really). Initially, different colors will be used to
> distinguish the targets from distractors. Then, all the balls will turn to
> the color white and start moving randomly around the viewport, bouncing off
> the viewport edges and each other. After about 30 seconds of this, all the
> balls will disappear except one and the participant will be prompted to
> indicate whether the remaining ball is a target or distractor.
>
> That said, my questions are pretty general, but I wanted to provide some
> details as background...
>
> 1. What are the advantages, if any, of creating custom control for stimuli
> instead of using FunctionControllers and function callbacks? Since I'll
> probably make public the MOT stimulus code, I feel I should implement the
> experiment in the most "VisionEggic" way possible. Is using
> FunctionControllers considered preferred? If so, why?
>
As you've seen, the VE demos are basically of 2 flavors: those that use
FlowControl and those that don't. Those that use FlowControl are more
numerous simply because they were first, not because they're any more
"VisionEggic". When I wrote the VE, I was using FlowControl (before it
was even separated into its own module) exclusively because I was
concerned about the ability to have un-interrupted motion between trials
(I was doing motion adaptation experiments). Thus, the whole FlowControl
architecture was designed around a callback-based scheme in which you'd
update, for example, the phase of a grating on every frame update. This
callback-based scheme is a little confusing for some people and is also
the wrong tool for some jobs, and so I later ripped the FlowControl
stuff out of the Core module and into its own module. Given your
experimental design, I don't see any real advantage to using FlowControl
and would therefore suggest and doing your own flow control.
> 2. A single trial involves several stages: 5s fixation point, 5s showing
> targets and distractors, 30s motion, and then indefinite time presenting one
> target or distractor and waiting for a user response.
>
> (a) Should I create one stimulus class that does all of these stages, or
>
> (b) Should I create several stimulus classes -- such as FixationPoint, MOTCue,
> MOTMotion, MOTResponse -- and add them all to the viewport in the proper
> order? It's important to me that the VE screen not close and reopen, or
> otherwise disappear, delay, or flicker between the stimulus stages, if that's
> relevant to deciding between 2(a) and 2(b).
>
I'd a modified 2b. Not knowing more details, I'd suggest a single MOT
class that can switch modes between Cue, Motion and Response. Either
way, there shouldn't be any issue without re-opening screens or
unnecessary delays or flickering, so it's really up to you.
> 3. (My most important question:) How to I control for precise timing of my
> stimulus presentation (especially if I go with 2(b) over 2(a))? Do I need to
> instantiate and run my own timers (if so, how so?), or can I use the
> FrameTimer? I'm somewhat confused by Vision Egg's documentation for
> FrameTimer, as it indicates that the callback functions will receive a
> parameter "t", but it's not clear to me if "t" is elapsed time or number of
> frames presented thus far -- and if it's for elapsed time, if it's elapsed
> time from the beginning of the "go" loop or from the beginning of the last
> stimulus (i.e., in the case of using a sequence of stimuli as per 2(b)). In
> summary, then, I guess my question is: What's the best / preferred way to
> control the timing of a sequence of stimuli when more than one stimulus is
> used for a particular trial?
>
The FrameTimer is actually just used to generate the timing histograms
useful to check whether you've skipped frames. To query the time I
suggest using VisionEgg.time_func() -- this should give the best measure
of what time it is to update stimuli. (For example, to draw an object
moving at a certain velocity do something like "position_x =
velocity_x*dt + previous_position_x" where dt is calculated each frame
with "t_now = VisionEgg.time_func(); dt = t_now-t_previous; t_previous =
t_now"
> 4. Finally, is there a particular or preferred way of managing multiple trials
> within VE? All of the demos and examples I have seen only run one trial, so
> any recommendations / pointers / examples that anyone might have re: managing
> multiple trials would be most appreciated. In particular, I'll be using the
> Quest procedure to adjust adaptively the motion speed and number of targets
> and distractors.
>
Yes, for multiple trials, particularly in a QUEST context, I suggest
implementing your own flow control as suggested above. In fact, I've
long wanted to write a simple QUEST demo, and this own-flow-control
design is exactly what I'd do. If you write a QUEST demo that does
something simple such as find the contrast threshold of a moving grating
of a given SF TF, I would *love* to include this with the VE demos. In
the case that you wrote such a thing, I would happily read it with a
fine tooth comb and provide feedback.
Ciao for now!
Andrew
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
Other related posts: