def __init__(self, OBfile, synchan_activation_correction, tweaks, mpirank, uniquestr, granfilebase, resptuned=False, spiketable=False): self.mpirank = mpirank self.uniquestr = uniquestr self.context = moose.PyMooseBase.getContext() self.granfilebase = granfilebase self.spiketable = spiketable ## netseed is between 'seed' and '_' / '.xml' in OBfile ## ensure there is an _ before .xml, to consider both endings. OBfile_underscored = OBfile.replace('.xml','_.xml') self.netseed = float((OBfile_underscored.split('seed')[1]).split('_')[0]) load_channels() ## synchan_activation_correction depends on SIMDT, ## hence passed all the way down to ## granule_mitral_GABA synapse from the top level load_synapses(synchan_activation_correction) self.cellSegmentDict = load_cells() filename = OBfile NML = NetworkML({'temperature':CELSIUS}) ## Below returns populationDict = { 'populationname1':(cellname,{instanceid1:moosecell, ... }) , ... } ## and projectionDict = { 'projectionname1':(source,target,[(syn_name1,pre_seg_path,post_seg_path),...]) , ... } (self.populationDict,self.projectionDict) = \ NML.readNetworkMLFromFile(filename,self.cellSegmentDict,params=tweaks) if VARY_GRANS_RMP: self.set_granules_rmp(gran_RMP_SD) if VARY_PGS_RMP: self.set_pgs_rmp(PG_RMP_SD) # let PGs vary also self.set_different_pgs() # set cells as PG_LTS or PG ## Vary synapse/channel Gbar-s only after setting them as PG_LTS or PG above self.set_pgs_input_conductances() # set input conductance based on PG type #self.set_pgs_tca_var() # changes TCa for all PGs ## for PG_LTS, varying ELeak or TCa doesn't change RMP, varying KCa does self.set_pgs_kca_var() # changes KCa for PG_LTSs #### Granule baseline synapses and connected timetables are created #### by the networkml reader from the network xml file. #### But the firefiles need to be loaded into timetables. self.connect_granule_baselines_to_files('granule_baseline') #### mitral baseline synapses and connected timetables are created #### by the networkml reader from the network xml file. #### But the firefiles need to be loaded into timetables. #print "Connecting 10000 files per mit" ## connect baseline inhibition to mitrals at lateral dendrites #self.connect_granule_baselines_to_files('mitral_baseline') ## connect baseline inhibition to mitrals at tuft dendrites #self.connect_granule_baselines_to_files('tuft_mitral') #printCellTree(moose.Cell('granules_singles_0')) # unordered dictionary self.populationDict['mitrals'][1] is # renamed to a more friendly self.mitralTable self.mitralTable = self.populationDict['mitrals'][1] self.setupMitralRecordingTables() #printNetTree() print "OB Network from",OBfile,"loaded!"
def __init__(self, OBfile, synchan_activation_correction, tweaks, mpirank, uniquestr, granfilebase, resptuned=False, spiketable=False): self.mpirank = mpirank self.uniquestr = uniquestr self.context = moose.PyMooseBase.getContext() self.granfilebase = granfilebase self.spiketable = spiketable ## netseed is between 'seed' and '_' / '.xml' in OBfile ## ensure there is an _ before .xml, to consider both endings. OBfile_underscored = OBfile.replace('.xml', '_.xml') self.netseed = float( (OBfile_underscored.split('seed')[1]).split('_')[0]) load_channels() ## synchan_activation_correction depends on SIMDT, ## hence passed all the way down to ## granule_mitral_GABA synapse from the top level load_synapses(synchan_activation_correction) self.cellSegmentDict = load_cells() filename = OBfile NML = NetworkML({'temperature': CELSIUS}) ## Below returns populationDict = { 'populationname1':(cellname,{instanceid1:moosecell, ... }) , ... } ## and projectionDict = { 'projectionname1':(source,target,[(syn_name1,pre_seg_path,post_seg_path),...]) , ... } (self.populationDict,self.projectionDict) = \ NML.readNetworkMLFromFile(filename,self.cellSegmentDict,params=tweaks) if VARY_GRANS_RMP: self.set_granules_rmp(gran_RMP_SD) if VARY_PGS_RMP: self.set_pgs_rmp(PG_RMP_SD) # let PGs vary also self.set_different_pgs() # set cells as PG_LTS or PG ## Vary synapse/channel Gbar-s only after setting them as PG_LTS or PG above self.set_pgs_input_conductances( ) # set input conductance based on PG type #self.set_pgs_tca_var() # changes TCa for all PGs ## for PG_LTS, varying ELeak or TCa doesn't change RMP, varying KCa does self.set_pgs_kca_var() # changes KCa for PG_LTSs #### Granule baseline synapses and connected timetables are created #### by the networkml reader from the network xml file. #### But the firefiles need to be loaded into timetables. self.connect_granule_baselines_to_files('granule_baseline') #### mitral baseline synapses and connected timetables are created #### by the networkml reader from the network xml file. #### But the firefiles need to be loaded into timetables. #print "Connecting 10000 files per mit" ## connect baseline inhibition to mitrals at lateral dendrites #self.connect_granule_baselines_to_files('mitral_baseline') ## connect baseline inhibition to mitrals at tuft dendrites #self.connect_granule_baselines_to_files('tuft_mitral') #printCellTree(moose.Cell('granules_singles_0')) # unordered dictionary self.populationDict['mitrals'][1] is # renamed to a more friendly self.mitralTable self.mitralTable = self.populationDict['mitrals'][1] self.setupMitralRecordingTables() #printNetTree() print "OB Network from", OBfile, "loaded!"
from neuroml_utils import * from sim_utils import * # has build_tweaks() from networkConstants import * ## these are needed to load mitral cell and get segids and synapse locations from load_channels import * from load_synapses import * from load_cells import * from simset_odor import * # has synchan_activation_correction load_channels() ## synchan_activation_correction depends on SIMDT, ## hence passed all the way down to ## granule_mitral_GABA synapse from the top level load_synapses(synchan_activation_correction) ## cellSegmentDict[<cellname>] = { segid1 : [ segname,(proximalx,proximaly,proximalz), ## (distalx,distaly,distalz),diameter,length,[potential_syn1, ... ] ] , ... } cellSegmentDict = load_cells() from pylab import * ## USAGE: ## python2.6 plot_mitral_connectivity_NetworkML.py <networkmlfile.xml> ## OR ## python2.6 plot_mitral_connectivity_NetworkML.py SYN_DECAY ## The plots are for weights and numbers of all exc/inh synapses on the central/lateral mitrals. ## The printing on the terminal gives weights located proximally vs distally from central mits. TWOGLOMS = False#True # whether to check for mits 0,2 (True) or 0,1 (False) INCLUDEMULTIS = True # whether to include multi-s in joint connectivity class NetworkML():