def mkmitral(gid): nrn = getmitral(gid) m = h.Mitral() m.createsec(len(nrn.dend), len(nrn.tuft)) m.subsets() m.topol(0) # need to connect secondary dendrites explicitly for i, d in enumerate(nrn.dend): # <<< check my changed if if(d.parent == nrn.soma): # <<< changed name m.secden[i].connect(m.soma(.5)) else: m.secden[i].connect(m.secden[d.parent.index](1)) # <<< changed name m.geometry() m.segments() # depends on geometry m.geometry() # again to get the hillock stylized shape fillall(nrn, m) m.segments() # again to get the proper number of segments for tuft and secden m.soma.push() m.x = h.x3d(0) m.y = h.y3d(0) m.z = h.z3d(0) h.pop_section() m.memb() return m
def mkmitral(gid): nrn = getmitral(gid) m = h.Mitral() m.createsec(len(nrn.dend), len(nrn.tuft)) m.subsets() m.topol(0) # need to connect secondary dendrites explicitly for i, d in enumerate(nrn.dend): # <<< check my changed if if (d.parent == nrn.soma): # <<< changed name m.secden[i].connect(m.soma(.5)) else: m.secden[i].connect( m.secden[d.parent.index](1)) # <<< changed name m.geometry() m.segments() # depends on geometry m.geometry() # again to get the hillock stylized shape fillall(nrn, m) m.segments( ) # again to get the proper number of segments for tuft and secden m.soma.push() m.x = h.x3d(0) m.y = h.y3d(0) m.z = h.z3d(0) h.pop_section() m.memb() return m
def __init__(self, mgid): self.mgid = mgid from getmitral import getmitral self.mitral = getmitral(mgid) self.soma = None self.apic = None self.dend = [] self.tuft = [] self.soma_color = (250. / 255, 210. / 255, 51. / 255) self.section_color = (1., 1., 1.) self.__vtkconvert() self.conn_info = [] tointerp = set() for isec in range(len(self.dend)): for iseg in range(len(self.dend[isec])): tointerp.add((2, isec, iseg)) for gid in gd.mgid_dict[mgid]: if gid >= params.gid_granule_begin + granules.ngranule: if gid % 2 == 0: self.conn_info.append(gd.gid_dict[gid]) isec, x = gd.gid_dict[gid][1:3] iseg = int(x * len(self.dend[isec])) if iseg >= len(self.dend[isec]): iseg = len(self.dend[isec]) - 1 tointerp.discard((2, isec, iseg)) self.__tointerp = self.__interp_rules(tointerp) self.__show_weights = False
def __init__(self, mgid): self.mgid = mgid from getmitral import getmitral self.mitral = getmitral(mgid) self.soma = None self.apic = None self.dend = [] self.tuft = [] self.soma_color = (250. / 255, 210. / 255, 51. / 255) self.section_color = (1., 1., 1.) self.__vtkconvert() self.conn_info = [] tointerp = set() for isec in range(len(self.dend)): for iseg in range(len(self.dend[isec])): tointerp.add((2, isec, iseg)) for gid in gd.mgid_dict[mgid]: if gid >= params.gid_granule_begin + granules.ngranule: if gid % 2 == 0: self.conn_info.append(gd.gid_dict[gid]) isec, x = gd.gid_dict[gid][1:3] iseg = int(x*len(self.dend[isec])) if iseg >= len(self.dend[isec]): iseg = len(self.dend[isec])-1 tointerp.discard((2, isec, iseg)) self.__tointerp = self.__interp_rules(tointerp) self.__show_weights = False