cellMechNames = project.cellMechanismInfo.getAllCellMechanismNames() for syn in syns: if not syn in cellMechNames: print "Synapse mechanism %s not found in project!"%syn exit() synProp = SynapticProperties(syn) synProp.setThreshold(0) synProp.setFixedDelay(default_syn_delay) synList.add(synProp) searchPattern = SearchPattern.getRandomSearchPattern() maxMinLength = MaxMinLength() connectivityConditions = ConnectivityConditions() connectivityConditions.setGenerationDirection(ConnectivityConditions.TARGET_TO_SOURCE) connectivityConditions.setNumConnsInitiatingCellGroup(NumberGenerator(numPre)) if "axon" in postGroup: connectivityConditions.getPrePostAllowedLoc().setAxonsAllowedPost(1) if "dend" in preGroup: connectivityConditions.getPrePostAllowedLoc().setDendritesAllowedPre(1) connectivityConditions.setAllowAutapses(0) if("Elect" in syns[0]): connectivityConditions.setNoRecurrent(1)
''' prefix = "NCM_" target = "MDL08" for cell in cells: source = cell netConnName = prefix+source+"_"+target searchPattern = SearchPattern.getRandomSearchPattern() #searchPattern = SearchPattern.getClosestSearchPattern() # will be better, but slower! maxMinLength = MaxMinLength() connectivityConditions = ConnectivityConditions() connectivityConditions.setGenerationDirection(ConnectivityConditions.SOURCE_TO_TARGET) num = conns[cells.index(cell)] connectivityConditions.setNumConnsInitiatingCellGroup(NumberGenerator(num)) print "Set NumConnsInitiatingCellGroup to %i"%num ''' if "axon" in postGroup: connectivityConditions.getPrePostAllowedLoc().setAxonsAllowedPost(1) connectivityConditions.getPrePostAllowedLoc().setDendritesAllowedPost(0) connectivityConditions.getPrePostAllowedLoc().setSomaAllowedPost(0) ''' print "Set connectivityConditions: " + str(connectivityConditions)