def importAxialResistance(self, nmlcell, intracellularProperties): sg_to_segments = self._cell_to_sg[nmlcell] for r in intracellularProperties.resistivity: segments = getSegments(nmlcell, r, sg_to_segments) for seg in segments: comp = self.nml_to_moose[seg] setRa(comp, SI(r.value))
def importCapacitances(self, nmlcell, moosecell, specificCapacitances): sg_to_segments = self._cell_to_sg[nmlcell] for specific_cm in specificCapacitances: cm = SI(specific_cm.value) for seg in sg_to_segments[specific_cm.segmentGroup]: comp = self.nml_to_moose[seg] comp.Cm = np.pi * sarea(comp)
def createDecayingPoolConcentrationModel(self, concModel): """Create prototype for concentration model""" if concModel.name is not None: name = concModel.name else: name = concModel.id ca = moose.CaConc('%s/%s' % (self.lib.path, id)) print('11111', concModel.restingConc) print('2222', concModel.decayConstant) print('33333', concModel.shellThickness) ca.CaBasal = SI(concModel.restingConc) ca.tau = SI(concModel.decayConstant) ca.thick = SI(concModel.shellThickness) ca.B = 5.2e-6 # B = 5.2e-6/(Ad) where A is the area of the shell and d is thickness - must divide by shell volume when copying self.proto_pools[concModel.id] = ca self.nml_to_moose[concModel.id] = ca self.moose_to_nml[ca] = concModel logger.debug('Created moose element: %s for nml conc %s' % (ca.path, concModel.id))
def importChannelsToCell(self, nmlcell, moosecell, membraneProperties): sg_to_segments = self._cell_to_sg[nmlcell] for chdens in membraneProperties.channelDensity: segments = getSegments(nmlcell, chdens, sg_to_segments) condDensity = SI(chdens.condDensity) try: ionChannel = self.id_to_ionChannel[chdens.ionChannel] except KeyError: print('No channel with id', chdens.ionChannel) continue if ionChannel.type_ == 'ionChannelPassive': for seg in segments: self.setRm(self.nml_to_moose[seg], condDensity) else: for seg in segments: self.copyChannel(chdens, self.nml_to_moose[seg], condDensity)