def expandFunction(self, func, args=[]):
        params = self._autoParams.allData()
        steps = self.autoParamRanges()
        ntraces = 1
        for p in steps:
            ntraces = ntraces*len(p)
        varylist = [[None for x in range(len(params))] for y in range(ntraces)]
        x = 1
        for iset, step_set in enumerate(steps):
            for itrace in range(ntraces):
                idx = (itrace / x) % len(step_set)
                varylist[itrace][iset] = step_set[idx]
            x = x*len(step_set)
        stim_list = []
        for itrace in range(ntraces):
            for ip, param in enumerate(params):
                for component in param['selection']:
                    index = self.indexByComponent(component)
                    component = self.component(*index)
                    component.set(param['parameter'], varylist[itrace][ip])
            stim_list.append(func(*args))
        for ip, param in enumerate(params):
            for component in param['selection']:
                component.set(param['parameter'], varylist[0][ip])
        return stim_list