コード例 #1
0
ファイル: Core.py プロジェクト: chrox/RealTimeElectrophy
 def __init__(self, subject=None, params=None, viewport=None, **kwargs):
     super(Stimulus, self).__init__(**kwargs)
     self.name = "stimulus"
     self.logger = logging.getLogger('LightStim.Stimulus')
     self.param_names = []
     self.defalut_parameters = {}
     
     if subject is not None:
         self.param_file = "stimulus_params." + subject + ".pkl"
     else:
         self.param_file = "stimulus_params.pkl"
         
     if hasattr(params,'bgbrightness'):
         self.bgcolor = (params.bgbrightness, params.bgbrightness, params.bgbrightness)
     else:
         self.bgcolor = (0.0,0.0,0.0)
     if viewport:
         self.viewport = Viewport(name=viewport, bgcolor=self.bgcolor)
         
     """ store stimulus parameters """
     self.parameters = dictattr()
     if params is not None:
         self.set_parameters(self.parameters, params)
     
     self.sweep_completed = False
     self.stimuli = []
     self.controllers = []
     self.event_handlers = []
コード例 #2
0
ファイル: Plaid.py プロジェクト: chrox/RealTimeElectrophy
 def __init__(self, params, **kwargs):
     super(Plaid, self).__init__(**kwargs)
     self.name = 'plaid'
     self.parameters = dictattr()
     self.set_parameters(self.parameters, params)
     
     self.make_stimuli()
コード例 #3
0
ファイル: Text.py プロジェクト: chrox/RealTimeElectrophy
    def __init__(self, params, **kwargs):
        super(Hint, self).__init__(params=params, **kwargs)
        self.name = "hint"
        self.parameters = dictattr()
        self.set_parameters(self.parameters, params)

        self.make_stimuli()
コード例 #4
0
    def __init__(self, subject=None, params=None, viewport=None, **kwargs):
        super(Stimulus, self).__init__(**kwargs)
        self.name = "stimulus"
        self.logger = logging.getLogger('LightStim.Stimulus')
        self.param_names = []
        self.defalut_parameters = {}

        if subject is not None:
            self.param_file = "stimulus_params." + subject + ".pkl"
        else:
            self.param_file = "stimulus_params.pkl"

        if hasattr(params, 'bgbrightness'):
            self.bgcolor = (params.bgbrightness, params.bgbrightness,
                            params.bgbrightness)
        else:
            self.bgcolor = (0.0, 0.0, 0.0)
        if viewport:
            self.viewport = Viewport(name=viewport, bgcolor=self.bgcolor)
        """ store stimulus parameters """
        self.parameters = dictattr()
        if params is not None:
            self.set_parameters(self.parameters, params)

        self.sweep_completed = False
        self.stimuli = []
        self.controllers = []
        self.event_handlers = []
コード例 #5
0
ファイル: Plaid.py プロジェクト: chrox/RealTimeElectrophy
    def __init__(self, params, **kwargs):
        super(Plaid, self).__init__(**kwargs)
        self.name = 'plaid'
        self.parameters = dictattr()
        self.set_parameters(self.parameters, params)

        self.make_stimuli()
コード例 #6
0
ファイル: Text.py プロジェクト: chrox/RealTimeElectrophy
 def __init__(self, params, **kwargs):
     super(Hint, self).__init__(params=params, **kwargs)
     self.name = 'hint'
     self.parameters = dictattr()
     self.set_parameters(self.parameters, params)
     
     self.make_stimuli()
コード例 #7
0
    def __init__(self, params, sweepseq, trigger=True, **kwargs):
        super(WhiteNoise, self).__init__(**kwargs)
        self.name = 'whitenoise'
        self.savedpost = []
        self.parameters = dictattr()
        self.load_params(self.parameters)
        self.set_parameters(self.parameters, params)
        self.sweepseq = sweepseq
        self.trigger = trigger

        self.make_stimuli()
        self.register_controllers()
コード例 #8
0
 def __init__(self, params, sweepseq, trigger=True, **kwargs):
     super(WhiteNoise, self).__init__(**kwargs)
     self.name = 'whitenoise'
     self.savedpost = []
     self.parameters = dictattr()
     self.load_params(self.parameters)
     self.set_parameters(self.parameters, params)
     self.sweepseq = sweepseq
     self.trigger = trigger
     
     self.make_stimuli()
     self.register_controllers()