def readNetworkMLFromFile(self,filename,cellSegmentDict,params={}): """ specify tweak params = {'excludePopulations':[popname1,...], 'excludeProjections':[projname1,...], \ 'onlyInclude':{'includePopulation':(popname,[id1,...]),'includeProjections':(projname1,...)} } If excludePopulations is present, then excludeProjections must also be present: Thus if you exclude some populations, ensure that you exclude projections that refer to those populations also! Though for onlyInclude, you may specify only included cells and this reader will also keep cells connected to those in onlyInclude. This reader first prunes the exclude-s, then keeps the onlyInclude-s and those that are connected. Use 'includeProjections' if you want to keep some projections not connected to the primary 'includePopulation' cells but connected to secondary cells that connected to the primary ones: e.g. baseline synapses on granule cells connected to 'includePopulation' mitrals; these synapses receive file based pre-synaptic events, not presynaptically connected to a cell. In params, you further specify: 'createPotentialSynapses' : True (False by default) to create synapses at all potential locations/compartments specified in the MorphML cell file even before Projections tag is parsed. 'combineSegments' : True (False by default) to ask neuroml to combine segments belonging to a cable (Neuron generates multiple segments per section). """ print("reading file ... ", filename) tree = ET.parse(filename) root_element = tree.getroot() print("Tweaking model ... ") tweak_model(root_element, params) print("Loading model into MOOSE ... ") return self.readNetworkML(root_element,cellSegmentDict,params,root_element.attrib['lengthUnits'])
def readNetworkMLFromFile(self, filename, cellSegmentDict, params={}): """ specify tweak params = {'excludePopulations':[popname1,...], 'excludeProjections':[projname1,...], \ 'onlyInclude':{'includePopulation':(popname,[id1,...]),'includeProjections':(projname1,...)} } If excludePopulations is present, then excludeProjections must also be present: Thus if you exclude some populations, ensure that you exclude projections that refer to those populations also! Though for onlyInclude, you may specify only included cells and this reader will also keep cells connected to those in onlyInclude. This reader first prunes the exclude-s, then keeps the onlyInclude-s and those that are connected. Use 'includeProjections' if you want to keep some projections not connected to the primary 'includePopulation' cells but connected to secondary cells that connected to the primary ones: e.g. baseline synapses on granule cells connected to 'includePopulation' mitrals; these synapses receive file based pre-synaptic events, not presynaptically connected to a cell. In params, you further specify: 'createPotentialSynapses' : True (False by default) to create synapses at all potential locations/compartments specified in the MorphML cell file even before Projections tag is parsed. 'combineSegments' : True (False by default) to ask neuroml to combine segments belonging to a cable (Neuron generates multiple segments per section). """ print("reading file ... ", filename) tree = ET.parse(filename) root_element = tree.getroot() print("Tweaking model ... ") tweak_model(root_element, params) print("Loading model into MOOSE ... ") return self.readNetworkML(root_element, cellSegmentDict, params, root_element.attrib['lengthUnits'])
def readNetworkMLFromFile(self,filename,cellSegmentDict,params={}): """ specify tweak params = {'excludePopulations':[popname1,...], 'excludeProjections':[projname1,...], \ 'onlyInclude':{'includePopulation':(popname,[id1,...]),'includeProjections':(projname1,...)} } If excludePopulations is present, then excludeProjections must also be present: Thus if you exclude some populations, ensure that you exclude projections that refer to those populations also! Though for onlyInclude, you may specify only included cells and this reader will also keep cells connected to those in onlyInclude. This reader first prunes the exclude-s, then keeps the onlyInclude-s and those that are connected. Use 'includeProjections' if you want to keep some projections not connected to the primary 'includePopulation' cells but connected to secondary cells that connected to the primary ones: e.g. baseline synapses on granule cells connected to 'includePopulation' mitrals; these synapses receive file based pre-synaptic events, not presynaptically connected to a cell. """ print "reading file ... ", filename tree = ET.parse(filename) root_element = tree.getroot() print "Tweaking model ... " tweak_model(root_element, params) print "Loading model into MOOSE ... " return self.readNetworkML(root_element,cellSegmentDict,params,root_element.attrib['lengthUnits'])