neurom.core.iter_neurites

neurom.core.iter_neurites(obj, mapfun=None, filt=None)

Iterator to a neurite, neuron or neuron population

Applies optional neurite filter and element mapping functions.

Example

Get the lengths of sections in a neuron and a population

>>> from neurom import sections as sec
>>> neuron_lengths = [l for l in iter_neurites(nrn, sec.length)]
>>> population_lengths = [l for l in iter_neurites(pop, sec.length)]
>>> neurite = nrn.neurites[0]
>>> tree_lengths = [l for l in iter_neurites(neurite, sec.length)]