コード例 #1
0
def determine_complexity(model):
    cx = []
    for gid in model.mitrals:
        cx.append((lb.cell_complexity(model.mitrals[gid]), gid))
    for gid in model.granules:
        cx.append((lb.cell_complexity(sec=model.granules[gid].soma), gid))
    return cx
コード例 #2
0
ファイル: complexity.py プロジェクト: JustasB/Mig3DTest
def determine_complexity(model):
  cx = []
  for gid in model.mitrals:
    cx.append((lb.cell_complexity(model.mitrals[gid]), gid))
  for gid in model.granules:
    cx.append((lb.cell_complexity(sec=model.granules[gid].soma),gid))
  return cx
コード例 #3
0
def determine_multisplit_complexity(model):
    ''' single phase '''
    cxlist = []
    for gid in model.mitrals:
        cxm = split.mitral_complexity(model.mitrals[gid])
        cxlist.append((cxm[1], (gid, -1)))
        for i, cx in enumerate(cxm[2]):
            cxlist.append((cx, (gid, i)))
    for gid in model.granules:
        cxlist.append(
            (lb.cell_complexity(sec=model.granules[gid].soma), (gid, -1)))
    for gid in model.blanes:
        cxlist.append(
            (lb.cell_complexity(sec=model.blanes[gid].soma), (gid, -1)))
    return cxlist
コード例 #4
0
def determine_multisplit_complexity(model):
  ''' single phase '''
  cxlist = []
  for gid in model.mitrals:
    cxm = split.mitral_complexity(model.mitrals[gid])
    cxlist.append((cxm[1],(gid,-1)))
    for i,cx in enumerate(cxm[2]):
      cxlist.append((cx,(gid,i)))
  for gid in model.granules:
    cxlist.append((lb.cell_complexity(sec=model.granules[gid].soma),(gid,-1)))
  return cxlist
コード例 #5
0
def msoma(mgid):
  c = mgid2pieces(mgid)
  if c and h.section_exists('soma', c):
    return c.soma
  return None

def mpriden(mgid):
  c = mgid2pieces(mgid)
  if c and h.section_exists('priden', c):
    return c.priden
  return None
  

def gsoma(ggid):
  c = ggid2pieces(ggid)
  if c and h.section_exists('soma', c):
    return c.soma
  return None

if __name__ == "__main__":
  from mkmitral import mkmitral
  gid = 259
  mcell = mkmitral(gid) # according to mkmitral.py this has tertiary branches
  print "mitral_complexity ", mitral_complexity(mcell)
  print "cell_complexity = ", lb.cell_complexity(mcell)
  pieces = secden_indices_connected_to_soma(mcell)
  pieces.append(-1)
  splitmitral(gid, mcell, pieces)
  h.topology()
  print "mgid2piece ", model.mgid2piece
コード例 #6
0
ファイル: split.py プロジェクト: JustasB/Mig3DTest
    subtree = h.SectionList()
    subtree.subtree(sec = cell.secden[i])
    secden_cx.append(subset_complexity(subtree))
    total_cx += secden_cx[-1]

  return (total_cx, soma_etc_cx, secden_cx)

def msoma(mgid):
  c = mgid2pieces(mgid)
  if c and h.section_exists('soma', c):
    return c.soma
  return None

def gsoma(ggid):
  c = ggid2pieces(ggid)
  if c and h.section_exists('soma', c):
    return c.soma
  return None

if __name__ == "__main__":
  from mkmitral import mkmitral
  gid = 259
  mcell = mkmitral(gid) # according to mkmitral.py this has tertiary branches
  print "mitral_complexity ", mitral_complexity(mcell)
  print "cell_complexity = ", lb.cell_complexity(mcell)
  pieces = secden_indices_connected_to_soma(mcell)
  pieces.append(-1)
  splitmitral(gid, mcell, pieces)
  h.topology()
  print "mgid2piece ", model.mgid2piece