def makeParams(): p.add( dataset=param.ObjectSelector(default='Gaussian',objects= ['Gaussian','Nature'],doc=""" Set of input patterns to use:: :'Gaussian': Two-dimensional Gaussians :'Nature': Shouval's 1999 monochrome 256x256 images"""), num_inputs=param.Integer(default=2,bounds=(1,None),doc=""" How many input patterns to present per unit area at each iteration, when using discrete patterns (e.g. Gaussians)."""), area=param.Number(default=1.0,bounds=(0,None), inclusive_bounds=(False,True),doc=""" Linear size of cortical area to simulate. 2.0 gives a 2.0x2.0 Sheet area in V1."""), retina_density=param.Number(default=24.0,bounds=(0,None), inclusive_bounds=(False,True),doc=""" The nominal_density to use for the retina."""), lgn_density=param.Number(default=24.0,bounds=(0,None), inclusive_bounds=(False,True),doc=""" The nominal_density to use for the LGN."""), cortex_density=param.Number(default=48.0,bounds=(0,None), inclusive_bounds=(False,True),doc=""" The nominal_density to use for V1."""), scale=param.Number(default=0.7,inclusive_bounds=(False,True),doc=""" Brightness of the input patterns"""), aff_strength=param.Number(default=1.5,bounds=(0.0,None),doc=""" Overall strength of the afferent projection to V1."""), exc_strength=param.Number(default=1.7,bounds=(0.0,None),doc=""" Overall strength of the lateral excitatory projection to V1."""), inh_strength=param.Number(default=1.4,bounds=(0.0,None),doc=""" Overall strength of the lateral inhibitory projection to V1."""), aff_lr=param.Number(default=0.1,bounds=(0.0,None),doc=""" Learning rate for the afferent projection to V1."""), exc_lr=param.Number(default=0.0,bounds=(0.0,None),doc=""" Learning rate for the lateral excitatory projection to V1."""), inh_lr=param.Number(default=0.3,bounds=(0.0,None),doc=""" Learning rate for the lateral inhibitory projection to V1.""")) return p
def _register_global_params(self, params): """ Register the parameters of this object as global parameters available for users to set from the command line. Values supplied as global parameters will override those of the given dictionary of params. """ for name,obj in self.params().items(): global_params.add(**{name:obj}) for name,val in params.items(): global_params.params(name).default=val params.update(global_params.get_param_values()) params["name"]=self.name
def _register_global_params(self, params): """ Register the parameters of this object as global parameters available for users to set from the command line. Values supplied as global parameters will override those of the given dictionary of params. """ for name, obj in self.params().items(): global_params.add(**{name: obj}) for name, val in params.items(): global_params.params(name).default = val params.update(global_params.get_param_values()) params["name"] = self.name
import glob import os import sys import tempfile import commands import param from topo.misc.commandline import global_params as p p.add( targets = param.List(default=['quick'],doc="List the targets required, e.g. ['exhaustive'] for all tests except speedtests, or ['speed'] for speed tests."), timing = param.Boolean(default=False), testdp = param.Number(default=6), testdp_unopt = param.Number(default=5) ) if p.timing: timing_cmd = "/usr/bin/time" else: timing_cmd = "" # http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python def which(program): import os def is_exe(fpath):
import glob import os import sys import tempfile import commands import param from topo.misc.commandline import global_params as p p.add( targets = param.List(default=[],doc="Leave empty for default set, ['all'] for all tests except speedtests, ['speed'] for speed tests, or else list the targets required."), timing = param.Boolean(default=False), testdp = param.Number(default=6), testdp_unopt = param.Number(default=5) ) if p.timing: timing_cmd = "/usr/bin/time" else: timing_cmd = "" # http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python def which(program): import os def is_exe(fpath):
# import glob import os import sys import tempfile import commands import param from topo.misc.commandline import global_params as p p.add(targets=param.List( default=[], doc= "Leave empty for default set, ['all'] for all tests except speedtests, ['speed'] for speed tests, or else list the targets required." ), coverage=param.Boolean(default=False), timing=param.Boolean(default=False), testdp=param.Number(default=7), testdp_unopt=param.Number(default=5)) if p.coverage: coverage_cmd = "bin/coverage run --rcfile=doc/buildbot/coveragerc -a -p" else: coverage_cmd = "" if p.timing: timing_cmd = "/usr/bin/time" else: timing_cmd = ""
# to be reduced (if the tests change, or to accommodate other # processors/platforms). # import os import sys import param from topo.misc.commandline import global_params as p p.add( targets = param.List(default=['quick'],doc="List the targets required, e.g. ['exhaustive'] for all tests except speedtests, or ['speed'] for speed tests."), timing = param.Boolean(default=False), testdp = param.Number(default=6), testdp_unopt = param.Number(default=5) ) if p.timing: timing_cmd = "/usr/bin/time" else: timing_cmd = "" # http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python def which(program): import os def is_exe(fpath):