pymaid.CatmaidNeuron.prune_by_longest_neurite

CatmaidNeuron.prune_by_longest_neurite(n: int = 1, reroot_soma: bool = False, inplace: bool = False) TreeNeuron | None

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.