コード例 #1
0
ファイル: test_feature_compat.py プロジェクト: markovg/NeuroM
    def test_get_local_bifurcation_angles(self):
        _close(_nrt.local_bifurcation_angles(self.sec_nrn),
               get('local_bifurcation_angles', self.ref_nrn))

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

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

        _close(ba, get('local_bifurcation_angles', self.ref_nrn))
コード例 #2
0
def test_local_bifurcation_angles():
    ref_local_bifangles = list(nf.local_bifurcation_angles(NEURON))

    local_bifangles = get_feature('local_bifurcation_angles', NEURON)
    nt.eq_(len(local_bifangles), 40)
    assert_allclose(local_bifangles, ref_local_bifangles)
    local_bifangles = get_feature('local_bifurcation_angles',
                                  NEURON,
                                  neurite_type=NeuriteType.all)
    nt.eq_(len(local_bifangles), 40)
    assert_allclose(local_bifangles, ref_local_bifangles)

    s = get_feature('local_bifurcation_angles',
                    NEURON,
                    neurite_type=NeuriteType.axon)
    nt.eq_(len(s), 10)

    s = get_feature('local_bifurcation_angles',
                    NEURON,
                    neurite_type=NeuriteType.basal_dendrite)
    nt.eq_(len(s), 20)

    s = get_feature('local_bifurcation_angles',
                    NEURON,
                    neurite_type=NeuriteType.apical_dendrite)
    nt.eq_(len(s), 10)
コード例 #3
0
ファイル: test_get_features.py プロジェクト: markovg/NeuroM
def test_local_bifurcation_angles():
    ref_local_bifangles = list(nf.local_bifurcation_angles(NEURON))

    local_bifangles = get_feature('local_bifurcation_angles', NEURON)
    assert len(local_bifangles) == 40
    assert_allclose(local_bifangles, ref_local_bifangles)
    local_bifangles = get_feature('local_bifurcation_angles',
                                  NEURON,
                                  neurite_type=NeuriteType.all)
    assert len(local_bifangles) == 40
    assert_allclose(local_bifangles, ref_local_bifangles)

    s = get_feature('local_bifurcation_angles',
                    NEURON,
                    neurite_type=NeuriteType.axon)
    assert len(s) == 10

    s = get_feature('local_bifurcation_angles',
                    NEURON,
                    neurite_type=NeuriteType.basal_dendrite)
    assert len(s) == 20

    s = get_feature('local_bifurcation_angles',
                    NEURON,
                    neurite_type=NeuriteType.apical_dendrite)
    assert len(s) == 10
コード例 #4
0
ファイル: test_neuritefunc.py プロジェクト: joewgraham/NeuroM
def test_local_bifurcation_angles():
    local_bif_angles = list(_nf.local_bifurcation_angles(SIMPLE))
    assert_allclose(local_bif_angles, (pi, pi))