Ejemplo n.º 1
0
 def _n_sections_per_neurite(self, **kwargs):
     '''Get an iterable with the number of sections for a given neurite type'''
     neurite_type = kwargs.get('neurite_type', TreeType.all)
     return self._iterable_type(
         [n_sections(n) for n in self.neurites
          if checkTreeType(neurite_type, n.type)]
     )
Ejemplo n.º 2
0
def test_n_sections():
    T = SIMPLE_TREE
    nt.ok_(n_sections(T) == 2)
    T2 = NEURON_TREE
    nt.ok_(n_sections(T2) == 3)
Ejemplo n.º 3
0
 def _n_sections(self, **kwargs):
     '''Get the number of sections of a given type'''
     neurite_type = kwargs.get('neurite_type', TreeType.all)
     return sum(n_sections(t) for t in self.neurites if checkTreeType(neurite_type, t.type))
Ejemplo n.º 4
0
 def get_n_sections_per_neurite(self, neurite_type=TreeType.all):
     '''Get an iterable with the number of sections for a given neurite type'''
     return self._iterable_type(
         [n_sections(n) for n in self.neurites
          if checkTreeType(neurite_type, n.type)]
     )
Ejemplo n.º 5
0
 def get_n_sections(self, neurite_type=TreeType.all):
     '''Get the number of sections of a given type'''
     return sum(n_sections(t) for t in self.neurites
                if checkTreeType(neurite_type, t.type))
Ejemplo n.º 6
0
 def get_n_sections_per_neurite(self, neurite_type=TreeType.all):
     '''Get an iterable with the number of sections for a given neurite type'''
     return self._iterable_type([
         n_sections(n) for n in self.neurites
         if checkTreeType(neurite_type, n.type)
     ])
Ejemplo n.º 7
0
 def get_n_sections(self, neurite_type=TreeType.all):
     '''Get the number of sections of a given type'''
     return sum(
         n_sections(t) for t in self.neurites
         if checkTreeType(neurite_type, t.type))