コード例 #1
0
    def test_get_section_radial_distances(self):
        _close(_nrt.section_radial_distances(self.sec_nrn),
               get('section_radial_distances', self.ref_nrn))

        for t in NeuriteType:
            _close(_nrt.section_radial_distances(self.sec_nrn, neurite_type=t),
                   get('section_radial_distances', self.ref_nrn, neurite_type=t))
コード例 #2
0
ファイル: test_neuritefunc.py プロジェクト: jdcourcol/NeuroM
def test_principal_direction_extents():
    # test with a realistic neuron
    nrn = nm.load_neuron(os.path.join(H5_PATH, 'bio_neuron-000.h5'))

    p_ref = [1672.9694359427331, 142.43704397865031, 226.45895382204986,
             415.50612748523838, 429.83008974193206, 165.95410536922873,
             346.83281498399697]

    p = _nf.principal_direction_extents(nrn)
    _close(np.array(p), np.array(p_ref))
コード例 #3
0
ファイル: test_neuritefunc.py プロジェクト: reddqian/NeuroM
def test_principal_direction_extents():
    principal_dir = list(_nf.principal_direction_extents(SIMPLE))
    assert_allclose(principal_dir, (14.736052694538641, 12.105102672688004))

    # test with a realistic neuron
    nrn = nm.load_neuron(os.path.join(H5_PATH, 'bio_neuron-000.h5'))

    p_ref = [
        1672.9694359427331, 142.43704397865031, 226.45895382204986,
        415.50612748523838, 429.83008974193206, 165.95410536922873,
        346.83281498399697
    ]

    p = _nf.principal_direction_extents(nrn)
    _close(np.array(p), np.array(p_ref))
コード例 #4
0
ファイル: test_feature_compat.py プロジェクト: markovg/NeuroM
    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))
コード例 #5
0
    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))
コード例 #6
0
ファイル: test_feature_compat.py プロジェクト: markovg/NeuroM
    def test_get_remote_bifurcation_angles(self):
        _close(_nrt.remote_bifurcation_angles(self.sec_nrn),
               get('remote_bifurcation_angles', self.ref_nrn))

        for t in NeuriteType:
            _close(_nrt.remote_bifurcation_angles(self.sec_nrn, neurite_type=t),
                   get('remote_bifurcation_angles', self.ref_nrn, neurite_type=t))

        ba = [_bf.remote_bifurcation_angle(b)
              for b in i_chain2(self.sec_nrn_trees, iterator_type=Section.ibifurcation_point)]

        _close(ba, get('remote_bifurcation_angles', self.ref_nrn))
コード例 #7
0
    def test_get_remote_bifurcation_angles(self):
        _close(_nrt.remote_bifurcation_angles(self.sec_nrn),
               get('remote_bifurcation_angles', self.ref_nrn))

        for t in NeuriteType:
            _close(_nrt.remote_bifurcation_angles(self.sec_nrn, neurite_type=t),
                   get('remote_bifurcation_angles', self.ref_nrn, neurite_type=t))

        ba = [_bf.remote_bifurcation_angle(b)
              for b in i_chain2(self.sec_nrn_trees, iterator_type=Tree.ibifurcation_point)]

        _close(ba, get('remote_bifurcation_angles', self.ref_nrn))
コード例 #8
0
 def test_get_trunk_section_lengths(self):
     _close(_nrn.trunk_section_lengths(self.sec_nrn),
            get('trunk_section_lengths', self.ref_nrn))
     for t in NeuriteType:
         _close(_nrn.trunk_section_lengths(self.sec_nrn, neurite_type=t),
                get('trunk_section_lengths', self.ref_nrn, neurite_type=t))
コード例 #9
0
 def test_get_trunk_section_lengths(self):
     _close(_nrn.trunk_section_lengths(self.sec_nrn), get('trunk_section_lengths', self.ref_nrn))
     for t in NeuriteType:
         _close(_nrn.trunk_section_lengths(self.sec_nrn, neurite_type=t),
                get('trunk_section_lengths', self.ref_nrn, neurite_type=t))