Show
Ignore:
Timestamp:
02/17/10 22:45:18 (2 years ago)
Author:
apdavison
Message:

Moved standard model (cells and synapses) machinery out of the common module into its own module

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/pcsim/__init__.py

    r712 r713  
    1515 
    1616import pyNN.random 
    17 from pyNN import common, recording, errors, space, __doc__ 
     17from pyNN import common, recording, errors, space, core, __doc__ 
    1818from pyNN.pcsim import simulator 
    1919common.simulator = simulator 
     
    7474    """Return a list of all the StandardCellType classes available for this simulator.""" 
    7575    setup() 
    76     standard_cell_types = [obj for obj in globals().values() if isinstance(obj, type) and issubclass(obj, common.StandardCellType)] 
     76    standard_cell_types = [obj for obj in globals().values() if isinstance(obj, type) and issubclass(obj, standardmodels.StandardCellType)] 
    7777    for cell_class in standard_cell_types: 
    7878        try: 
     
    261261#        if type(source) != types.ListType and type(target) != types.ListType: 
    262262#            connections = simulator.net.connect(source, target, syn_factory) 
    263 #            if not common.is_listlike(connections): 
     263#            if not core.is_listlike(connections): 
    264264#                connections = [connections] 
    265265#            return connections 
     
    304304          e.g., (10,10) will create a two-dimensional population of size 10x10. 
    305305        cellclass should either be a standardized cell class (a class inheriting 
    306         from common.StandardCellType) or a string giving the name of the 
     306        from standardmodels.StandardCellType) or a string giving the name of the 
    307307        simulator-specific model that makes up the population. 
    308308        cellparams should be a dict which is passed to the neuron model 
     
    336336            cellclass = getattr(pypcsim, cellclass) 
    337337            self.celltype = cellclass 
    338         if issubclass(cellclass, common.StandardCellType): 
     338        if issubclass(cellclass, standardmodels.StandardCellType): 
    339339            self.celltype = cellclass(cellparams) 
    340340            self.cellfactory = self.celltype.simObjFactory 
     
    582582        ## 
    583583        # handle synapse dynamics 
    584         if common.is_listlike(method.weights): 
     584        if core.is_listlike(method.weights): 
    585585            w = method.weights[0] 
    586586        elif hasattr(method.weights, "next"): # random distribution 
     
    588588        else: 
    589589            w = method.weights 
    590         if common.is_listlike(method.delays): 
     590        if core.is_listlike(method.delays): 
    591591            d = min(method.delays) 
    592592        elif hasattr(method.delays, "next"): # random distribution