navis.TreeNeuron.prune_by_longest_neurite¶
- TreeNeuron.prune_by_longest_neurite(n=1, reroot_soma=False, inplace=False)[source]¶
Prune neuron down to the longest neurite.
- Parameters:
n (int, optional) – Number of longest neurites to preserve.
reroot_soma (bool, optional) – If True, will reroot to soma before pruning.
inplace (bool, optional) – If True, operation will be performed on itself. If False, operation is performed on copy which is then returned.
See also
longest_neurite()
This is the base function. See for details and examples.