Esempio n. 1
0
p.contrast = 1
# background brightness (0-1)
p.bgbrightness = 0.5
# antialiase the bar?
p.antialiase = True
# flash the grating?
p.flash = False
# duration of each on period (sec)
p.flashduration = 0.5
# duration of each off period (sec)
p.flashinterval = 0.3
# factor to chage bar width and height by left/right/up/down key
p.sizemultiplier = 1.02
# factor to change temporal freq by on up/down
p.tfreqmultiplier = 1.01
# factor to change spatial freq by on left/right
p.sfreqmultiplier = 1.01
# factor to change contrast by on +/-
p.contrastmultiplier = 1.005
# orientation step size to snap to when scrolling mouse wheel (deg)
p.snapDeg = 12

stimulus_control = ManGrating(disp_info=True, params=p, viewport='control')
stimulus_left = ManGrating(disp_info=False, params=p, viewport='left')
stimulus_right = ManGrating(disp_info=False, params=p, viewport='right')

sweep = FrameSweep()
sweep.add_stimulus(stimulus_control)
sweep.add_stimulus(stimulus_left)
sweep.add_stimulus(stimulus_right)
sweep.go()
Esempio n. 2
0
    def __init__(self, subject):
        """ Fixation """
        fp = dictattr()
        fp.bgbrightness = 0.5
        fp.color = (1.0, 0.0, 0.0, 1.0)
        fp.width = 0.25

        self.fixation_left = Fixation(viewport='left',
                                      subject=subject,
                                      params=fp)
        self.fixation_right = Fixation(viewport='right',
                                       subject=subject,
                                       params=fp)
        """ Random Dots with disc"""
        dp = dictattr()
        dp.bgbrightness = 0.5
        dp.antialiase = True

        dp.dotSquareWidth = 7.5
        dp.dotsNumber = 2000
        dp.randomSeed = 0
        dp.dotColor = (0.8, 0.8, 0.8)
        dp.dotSize = 3
        dp.discDistDeg = 2.5
        dp.discDiameter = 1.25
        dp.disparity = 0

        self.dp = dp
        self.subject = subject
        self.disc_left = StereoDisc(viewport='left',
                                    subject=subject,
                                    params=dp)
        self.disc_right = StereoDisc(viewport='right',
                                     subject=subject,
                                     params=dp)
        """ Mask: Random Dots """
        mp = dictattr()
        mp.bgbrightness = 0.5
        mp.antialiase = True

        mp.dotSquareWidth = 7.5
        mp.dotsNumber = 4500
        mp.randomSeed = 1
        mp.dotColor = (1, 1, 1)
        mp.dotSize = 2

        self.mp = mp
        self.mask_left = RandomDots(viewport='left',
                                    subject=subject,
                                    params=mp)
        self.mask_right = RandomDots(viewport='right',
                                     subject=subject,
                                     params=mp)
        """ Hint """
        hp = dictattr()
        hp.bgbrightness = 0.5
        hp.text = "Press left or right for disc interval."
        hp.xorigDeg = 5.0
        hp.yorigDeg = 0.0
        hp.color = (1.0, 0.0, 0.0, 1.0)
        hp.fontsize = 25
        self.hint_left = Hint(viewport="left", params=hp)
        hp.xorigDeg = -5.0
        self.hint_right = Hint(viewport="right", params=hp)

        self.sweep = FrameSweep()
        self.key_response = LeftRightKeyResponse(self.sweep)
        self.mouse_response = LeftRightMouseResponse(self.sweep)