Пример #1
0
 def _run_trial(self):
     self.log.debug('running trial')
     self.log.debug("number of open file descriptors: %d" %(utils.get_num_open_fds()))
     utils.run_state_machine(start_in='pre',
                             error_state='post',
                             error_callback=self.log_error_callback,
                             pre=self.trial_pre,
                             main=self.trial_main,
                             post=self.trial_post)
Пример #2
0
    def trial_pre(self):
        ''' this is where we initialize a trial'''
        # make sure lights are on at the beginning of each trial, prep for trial
        self.log.debug('running trial')
        self.log.debug("number of open file descriptors: %d" %(utils.get_num_open_fds()))

        self.this_trial = self.trials[-1]
        min_wait = self.this_trial.stimulus_event.duration
        max_wait = self.this_trial.stimulus_event.duration + self.parameters['response_win']
        self.this_trial.annotate(min_wait=min_wait)
        self.this_trial.annotate(max_wait=max_wait)
        self.log.debug('created new trial')
        self.log.debug('min/max wait: %s/%s' % (min_wait,max_wait))
Пример #3
0
    def trial_pre(self):
        ''' this is where we initialize a trial'''
        # make sure lights are on at the beginning of each trial, prep for trial
        self.log.debug('running trial')
        self.log.debug("number of open file descriptors: %d" %(utils.get_num_open_fds()))

        self.this_trial = self.trials[-1]
        min_wait = self.this_trial.stimulus_event.duration
        max_wait = self.this_trial.stimulus_event.duration + self.parameters['response_win']
        self.this_trial.annotate(min_wait=min_wait)
        self.this_trial.annotate(max_wait=max_wait)
        self.log.debug('created new trial')
        self.log.debug('min/max wait: %s/%s' % (min_wait,max_wait))