def test_get_section_path_distances(self):
        _close(_nrt.section_path_lengths(self.sec_nrn), get('section_path_distances', self.ref_nrn))
        for t in NeuriteType:
            _close(_nrt.section_path_lengths(self.sec_nrn, neurite_type=t),
                   get('section_path_distances', self.ref_nrn, neurite_type=t))

        pl = [_sec.section_path_length(s) for s in i_chain2(self.sec_nrn_trees)]
        _close(pl, get('section_path_distances', self.ref_nrn))
Exemple #2
0
def terminal_path_lengths_per_neurite(neurites, neurite_type=NeuriteType.all):
    """Get the path lengths to each terminal point per neurite in a collection."""
    return list(sectionfunc.section_path_length(s)
                for n in iter_neurites(neurites, filt=is_type(neurite_type))
                for s in iter_sections(n, iterator_type=Section.ileaf))