コード例 #1
0
ファイル: test_morphtree.py プロジェクト: wvangeit/NeuroM
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
ファイル: sections.py プロジェクト: guozanhua/NeuroM
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])