Пример #1
0
def test_segment_path_length():
    leaves = [l for l in tr.ileaf(NEURON_TREE)]
    for l in leaves:
        nt.ok_(path_length(l) == 9)

    leaves = [l for l in tr.ileaf(SIMPLE_TREE)]
    for l in leaves:
        nt.ok_(path_length(l) == 8)
Пример #2
0
def end_point_path_length(tree_section):
    '''Calculate the path length of a section't end point to the tree root

    Note:
        This function's argument is section of Tree objects
    '''
    return mt.path_length(tree_section[-1])