neat.MorphTree._convertNodeArgToNodes

MorphTree._convertNodeArgToNodes(node_arg)[source]

Converts a node argument to a list of nodes. Behaviour depends on the type of argument.

Parameters

node_arg (None, neat.MorphNode, {‘apical’, ‘basal’, ‘axonal’} or iterable collection of instances of neat.MorphNode) –

  • None: returns all nodes

  • neat.MorphNode: returns list of nodes in the subtree of the given node

  • {‘apical’, ‘basal’, ‘axonal’}: returns list of nodes in the apical, basal or axonal subtree

  • iterable collection of neat.MorphNode: returns the same list of nodes

    If an iterable collection of original nodes is given, and the treetype is computational, a reduced list is returned where only the corresponding computational nodes are included. If an iterable collection of computational nodes is given, and the treetype is original, a list of corresponding original nodes is given, but the in between nodes are not added.

Returns

Return type

list of neat.MorphNode