Ejemplo n.º 1
0
        self.logger.info('Register TimingController.')
        self.controllers.append(TimingController(self))
        self.controllers.append(RandPhaseController(self))
        self.controllers.append(RandOriController(self))


class OrthOriTimingSetGrating(SEDGrating):
    def register_controllers(self):
        super(OrthOriTimingSetGrating, self).register_controllers()
        self.logger.info('Register TimingController.')
        self.controllers.append(TimingController(self))
        self.controllers.append(RandPhaseController(self))
        self.controllers.append(OrthOriController(self))


DefaultScreen(['left', 'right'], bgcolor=(0.5, 0.5, 0.5))

p_left = dictattr()
p_left.ml = 0.5
p_left.tfreqCycSec = 0.0
p_left.bgbrightness = 0.5
p_left.contrast = 1
p_left.phase0 = 0

p_right = dictattr()
p_right.ml = 0.5
p_right.tfreqCycSec = 0.0
p_right.bgbrightness = 0.5
p_right.contrast = 1
p_right.phase0 = 0
Ejemplo n.º 2
0
# Generate random orientation and spatial frequency gratings.
#
# Copyright (C) 2010-2011 Huang Xin
#
# See LICENSE.TXT that came with this file.

from __future__ import division
from StimControl.LightStim.SweepSeque import ParamSeque
from StimControl.LightStim.FrameControl import FrameSweep
from StimControl.LightStim.Grating import ParamsGrating, MonocularGrating
from StimControl.LightStim.Core import DefaultScreen
from StimControl.LightStim.LightData import dictattr, IndexedParam

DefaultScreen(['left', 'right'])

p = dictattr()
p.ml = 0.5
p.tfreqCycSec = 2.0
p.bgbrightness = 0.5
p.phase0 = 0
p.contrast = 1

#Monocular stimuli
phase_at_t0 = [0]
monocular_param_left = ParamSeque(repeat=1,
                                  phase_at_t0=phase_at_t0,
                                  frame_duration=2.0,
                                  blank_duration=1.0)
monocular_param_right = ParamSeque(repeat=1,
                                   phase_at_t0=phase_at_t0,
                                   frame_duration=2.0,