code/vexptoolbox/experiment.py
def addTrials(self, num_trials=1, params={}, list_params={}, block=None):
        """ Add a specified number of trials. The contents of
        the 'params' dict are copied to each trial. You can then further
        modify each trial individually using its 'params' attribute.

        Args:
            num_trials (int): Number of trials to create
            params (dict): Parameter values to set in all trials
            list_params (dict): Parameters to assign to individual trials
                (each dict entry must contain a list of <num_trials> entries)
            block (int): Optional block number to group trials into blocks
        """
        if block is None:
            block = 0

        for key in list_params.keys():
            if len(list_params[key]) != num_trials:
                estr = 'Values in list_params must have the same length as num_trials! [{:s}]'
                raise ValueError(estr.format(key))

        for t in range(0, num_trials):
            tparams = copy.copy(params)
            tparams.update({key:val[t] for key, val in list_params.iteritems()})
            self.trials.append(Trial(params=tparams, block=block))

        self._updateTrialIndices()
        self._updateBlocks()
        self._dlog('Adding {:d} trials: {:s}'.format(num_trials, str(params)))
 Add a specified number of trials. The contents of
        the 'params' dict are copied to each trial. You can then further
        modify each trial individually using its 'params' attribute.

        Args:
            num_trials (int): Number of trials to create
            params (dict): Parameter values to set in all trials
            list_params (dict): Parameters to assign to individual trials
                (each dict entry must contain a list of <num_trials> entries)
            block (int): Optional block number to group trials into blocks
        
Add a specified number of trials. The contents of
the 'params' dict are copied to each trial. You can then further
modify each trial individually using its 'params' attribute.
Add a specified number of trials . The contents of the ' params ' dict are copied to each trial . You can then further modify each trial individually using its ' params ' attribute .
def addTrials(self, num_trials=1, params={}, list_params={}, block=None):
        if block is None:
            block = 0
        for key in list_params.keys():
            if len(list_params[key]) != num_trials:
                estr = 'Values in list_params must have the same length as num_trials! [{:s}]'
                raise ValueError(estr.format(key))
        for t in range(0, num_trials):
            tparams = copy.copy(params)
            tparams.update({key:val[t] for key, val in list_params.iteritems()})
            self.trials.append(Trial(params=tparams, block=block))
        self._updateTrialIndices()
        self._updateBlocks()
        self._dlog('Adding {:d} trials: {:s}'.format(num_trials, str(params)))
def addTrials ( self , num_trials = 1 , params = { } , list_params = { } , block = None ) : if block is None : block = 0 for key in list_params . keys ( ) : if len ( list_params [ key ] ) != num_trials : estr = 'Values in list_params must have the same length as num_trials! [{:s}]' raise ValueError ( estr . format ( key ) ) for t in range ( 0 , num_trials ) : tparams = copy . copy ( params ) tparams . update ( { key : val [ t ] for key , val in list_params . iteritems ( ) } ) self . trials . append ( Trial ( params = tparams , block = block ) ) self . _updateTrialIndices ( ) self . _updateBlocks ( ) self . _dlog ( 'Adding {:d} trials: {:s}' . format ( num_trials , str ( params ) ) )
Add a specified number of trials.
Add a specified number of trials .
""" Add a specified number of trials. The contents of
        the 'params' dict are copied to each trial. You can then further
        modify each trial individually using its 'params' attribute.

        Args:
            num_trials (int): Number of trials to create
            params (dict): Parameter values to set in all trials
            list_params (dict): Parameters to assign to individual trials
                (each dict entry must contain a list of <num_trials> entries)
            block (int): Optional block number to group trials into blocks
        """
self
num_trials
Number of trials to create
Number of trials to create
params
Parameter values to set in all trials
Parameter values to set in all trials
list_params
Parameters to assign to individual trials
(each dict entry must contain a list of  entries)
Parameters to assign to individual trials ( each dict entry must contain a list of entries )
block
Optional block number to group trials into blocks
Optional block number to group trials into blocks