code/vexptoolbox/experiment.py
def startTrial(self, trial_idx, repeat=False, print_summary=True):
        """ Start a specific trial by its index in the trial list,
        e.g. the first trial is experiment.trials[0]. By default each 
        trial is only run once unless repeat is set to True.

        Args:
            trial_idx: Trial object or index of trial to run
            repeat (bool): if True, allow repetition of an already finished trial
            print_summary (bool): if True, print out trial status and parameters
        """
        if self._trial_running:
            raise RuntimeError('Cannot start a trial while another trial is in progress!')

        if type(trial_idx) == Trial:
            trial_idx = trial_idx.index

        if self.trials[trial_idx].done and not repeat:
            s = 'Trial {:d} has already been run, set repeat=True to force repeat!'.format(trial_idx)
            raise RuntimeError(s)

        self._cur_trial = trial_idx
        if self._state < STATE_RUNNING:
            self._state = STATE_RUNNING
            viz.sendEvent(EXPERIMENT_START_EVENT, self, self.trials[trial_idx])

        self.trials[trial_idx]._start(index=trial_idx)
        self._trial_running = True

        if self._recorder is not None and self._auto_record:
            self._recorder.startRecording()
            self._recorder.recordEvent('TRIAL_START {:d}'.format(trial_idx))

        if print_summary:
            print(self.trials[self._cur_trial].summary)
        else:
            self._dlog(self.trials[self._cur_trial].summary)

        viz.sendEvent(TRIAL_START_EVENT, self, self.trials[trial_idx])
 Start a specific trial by its index in the trial list,
        e.g. the first trial is experiment.trials[0]. By default each 
        trial is only run once unless repeat is set to True.

        Args:
            trial_idx: Trial object or index of trial to run
            repeat (bool): if True, allow repetition of an already finished trial
            print_summary (bool): if True, print out trial status and parameters
        
Start a specific trial by its index in the trial list,
e.g. the first trial is experiment.trials[0]. By default each
trial is only run once unless repeat is set to True.
Start a specific trial by its index in the trial list e . g . the first trial is experiment . trials [ 0 ] . By default each trial is only run once unless repeat is set to True .
def startTrial(self, trial_idx, repeat=False, print_summary=True):
        if self._trial_running:
            raise RuntimeError('Cannot start a trial while another trial is in progress!')
        if type(trial_idx) == Trial:
            trial_idx = trial_idx.index
        if self.trials[trial_idx].done and not repeat:
            s = 'Trial {:d} has already been run, set repeat=True to force repeat!'.format(trial_idx)
            raise RuntimeError(s)
        self._cur_trial = trial_idx
        if self._state < STATE_RUNNING:
            self._state = STATE_RUNNING
            viz.sendEvent(EXPERIMENT_START_EVENT, self, self.trials[trial_idx])
        self.trials[trial_idx]._start(index=trial_idx)
        self._trial_running = True
        if self._recorder is not None and self._auto_record:
            self._recorder.startRecording()
            self._recorder.recordEvent('TRIAL_START {:d}'.format(trial_idx))
        if print_summary:
            print(self.trials[self._cur_trial].summary)
        else:
            self._dlog(self.trials[self._cur_trial].summary)
        viz.sendEvent(TRIAL_START_EVENT, self, self.trials[trial_idx])
def startTrial ( self , trial_idx , repeat = False , print_summary = True ) : if self . _trial_running : raise RuntimeError ( 'Cannot start a trial while another trial is in progress!' ) if type ( trial_idx ) == Trial : trial_idx = trial_idx . index if self . trials [ trial_idx ] . done and not repeat : s = 'Trial {:d} has already been run, set repeat=True to force repeat!' . format ( trial_idx ) raise RuntimeError ( s ) self . _cur_trial = trial_idx if self . _state < STATE_RUNNING : self . _state = STATE_RUNNING viz . sendEvent ( EXPERIMENT_START_EVENT , self , self . trials [ trial_idx ] ) self . trials [ trial_idx ] . _start ( index = trial_idx ) self . _trial_running = True if self . _recorder is not None and self . _auto_record : self . _recorder . startRecording ( ) self . _recorder . recordEvent ( 'TRIAL_START {:d}' . format ( trial_idx ) ) if print_summary : print ( self . trials [ self . _cur_trial ] . summary ) else : self . _dlog ( self . trials [ self . _cur_trial ] . summary ) viz . sendEvent ( TRIAL_START_EVENT , self , self . trials [ trial_idx ] )
Start a specific trial by its index in the trial list,
e.g.
Start a specific trial by its index in the trial list e . g .
""" Start a specific trial by its index in the trial list,
        e.g. the first trial is experiment.trials[0]. By default each 
        trial is only run once unless repeat is set to True.

        Args:
            trial_idx: Trial object or index of trial to run
            repeat (bool): if True, allow repetition of an already finished trial
            print_summary (bool): if True, print out trial status and parameters
        """
self
trial_idx
Trial object or index of trial to run
Trial object or index of trial to run
repeat
if True, allow repetition of an already finished trial
if True allow repetition of an already finished trial
print_summary
if True, print out trial status and parameters
if True print out trial status and parameters