[visionegg] Re: flicker due to an abrupt change of phase?

  • From: Andrew Straw <astraw@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Wed, 05 Nov 2008 07:21:55 -0800

Dear Alexandre,

There are some additional parameters to allow situations like yours to
work. Any SinGrating2D has the parameters

phase_at_t0
t0_time_sec_absolute

which hopefully have self-explanatory names. The idea is that current
phase is calculated according to:

if p.ignore_time:
  phase = p.phase_at_t0
else:
  t_var = VisionEgg.time_func() - p.t0_time_sec_absolute
  phase = t_var*p.temporal_freq_hz*-360.0 + p.phase_at_t0

Thus, setting these two parameters should allow you to do exactly what
you want. If you're dealing with 2 computers and thus 2 clocks, there
may be an issue synchronizing them so that your control computer can
tell the stimulus generation computer what time t0_time_sec_absolute
should be.

Also, you may be able to set the ignore_time parameter to True and
control phase/temporal freq purely through the phase_at_t0 parameter. In
that case, you'd probably want to write a function controller that
handled setting phase_at_t0 locally on the stimulus generation computer
rather than sending phase updates over the network.

I hope that helps,
Andrew

Alexandre Santos wrote:
> Hi Andrew,
> 
> We have been using gratingTCP.py to remotely display a stimulus
> synchronized with the microscope image acquisition. The program
> controlling the image acquisition sends the description of the
> stimulus to the computer producing the stimulus. The stimulus itself
> consists of a grating that is first static (tf=const(0)), and then
> moves across the screen (tf=const(1.5)). We coded the two phases of
> the stimulus (static grating, moving grating) with the same
> parameters, except obviously for the temporal frequency.
> 
> Our problem is that once the moving grating is presented, it shows a
> different phase from the static grating, which causes a undesired
> "flicker". This happens even if we define an equal phase parameter for
> both stimuli .
> 
> Do you have an idea on how we could avoid the flicker, and have a
> continuous transition from static to moving grating?
> 
> All the best,
> Alexandre Santos
> ======================================
> The Vision Egg mailing list
> Archives: //www.freelists.org/archives/visionegg
> Website: http://www.visionegg.org/mailinglist.html


-- 
Dr. Andrew D. Straw
California Institute of Technology
http://www.its.caltech.edu/~astraw/
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: