MorphTree.createNewTree(*args, **kwargs)[source]

Creates a new tree where the locs of a given ‘name’ are now the nodes. Distance relations between locations are maintained (note that this relation is stored in L attribute of neat.MorphNode, using the p3d attribute containing the 3d coordinates does not maintain distances)

  • name (string) – the name under which the locations are stored that should be used to create the new tree

  • fake_soma (bool (default False)) – if True, finds the common root of the set of locations and uses that as the soma of the new tree. If False, the real soma is used.

  • store_loc_inds (bool (default False)) – store the index of each location in the content attribute of the new node (under the key ‘loc ind’)


The new tree.

Return type