• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python fst.fst_get函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中neurom.fst.fst_get函数的典型用法代码示例。如果您正苦于以下问题:Python fst_get函数的具体用法?Python fst_get怎么用?Python fst_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了fst_get函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_segment_radii_pop

def test_segment_radii_pop():

    feat = 'segment_radii'

    nt.ok_(np.allclose(_stats(fst_get(feat, POP)),
                       (0.079999998211860657,
                        1.2150000333786011,
                        1301.9191725363567,
                        0.20222416473071708)))

    nt.ok_(np.allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.all)),
                       (0.079999998211860657,
                        1.2150000333786011,
                        1301.9191725363567,
                        0.20222416473071708)))

    nt.ok_(np.allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite)),
                       (0.13142434507608414,
                        1.0343990325927734,
                        123.41135908663273,
                        0.58767313850777492)))

    nt.ok_(np.allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite)),
                       (0.079999998211860657,
                        1.2150000333786011,
                        547.43900821779164,
                        0.42078324997524336)))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:27,代码来源:test_get_features.py


示例2: test_section_tortuosity_nrn

def test_section_tortuosity_nrn():
    feat = 'section_tortuosity'
    nt.ok_(np.allclose(_stats(fst_get(feat, NRN)),
                       (1.0702760052031612,
                        1.5732825321954911,
                        106.42449427885093,
                        1.2669582652244158)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.all)),
                       (1.0702760052031612,
                        1.5732825321954911,
                        106.42449427885093,
                        1.2669582652244158)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.apical_dendrite)),
                       (1.0702760052031612,
                        1.5732825321954911,
                        26.919574286670883,
                        1.2818844898414707)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.basal_dendrite)),
                       (1.0788578286296124,
                        1.5504287518256337,
                        51.540901640170489,
                        1.227164324765964)))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:25,代码来源:test_get_features.py


示例3: assert_features_for_neurite

def assert_features_for_neurite(feat, neurons, expected, exact=True):
    for neurite_type, expected_values in expected.items():
        print('neurite_type: %s' % neurite_type)

        if neurite_type is None:
            res_pop = fst_get(feat, neurons)
            res = fst_get(feat, neurons[0])
        else:
            res_pop = fst_get(feat, neurons, neurite_type=neurite_type)
            res = fst_get(feat, neurons[0], neurite_type=neurite_type)

        if exact:
            assert_items_equal(res_pop, expected_values)
        else:
            assert_allclose(res_pop, expected_values)

        #test for single neuron
        if isinstance(res, np.ndarray):
            # some features, ex: total_length return arrays w/ one element when
            # called on a single neuron
            nt.eq_(len(res), 1)
            res = res[0]
        if exact:
            nt.eq_(res, expected_values[0])
        else:
            assert_allclose(res, expected_values[0])
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:26,代码来源:test_get_features.py


示例4: test_segment_radii_nrn

def test_segment_radii_nrn():

    feat = 'segment_radii'

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN)),
                       (0.12087134271860123,
                        1.0343990325927734,
                        507.01994501426816,
                        0.60359517263603357)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.all)),
                       (0.12087134271860123,
                        1.0343990325927734,
                        507.01994501426816,
                        0.60359517263603357)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.apical_dendrite)),
                       (0.13142434507608414,
                        1.0343990325927734,
                        123.41135908663273,
                        0.58767313850777492)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.basal_dendrite)),
                       (0.14712842553853989,
                        1.0215770602226257,
                        256.71241207793355,
                        0.61122002875698467)))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:27,代码来源:test_get_features.py


示例5: test_section_tortuosity_pop

def test_section_tortuosity_pop():

    feat = 'section_tortuosity'

    assert_allclose(_stats(fst_get(feat, POP)),
                    (1.0,
                     4.6571118550276704,
                     440.40884450374455,
                     1.3427098917797089))

    assert_allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.all)),
                    (1.0,
                     4.6571118550276704,
                     440.40884450374455,
                     1.3427098917797089))

    assert_allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite)),
                    (1.0702760052031615,
                     1.5732825321954913,
                     26.919574286670883,
                     1.2818844898414707))

    assert_allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite)),
                    (1.042614577410971,
                     1.6742599832295344,
                     106.5960839640893,
                     1.239489348419643))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:27,代码来源:test_get_features.py


示例6: test_segment_lengths

def test_segment_lengths():
    ref_seglen = nf.segment_lengths(NEURON)
    seglen = fst_get('segment_lengths', NEURON)
    nt.eq_(len(seglen), 840)
    assert_allclose(seglen, ref_seglen)

    seglen = fst_get('segment_lengths', NEURON, neurite_type=NeuriteType.all)
    nt.eq_(len(seglen), 840)
    assert_allclose(seglen, ref_seglen)
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:9,代码来源:test_get_features.py


示例7: test_get_trunk_section_lengths

def test_get_trunk_section_lengths():
    assert_allclose(fst_get('trunk_section_lengths', NEURON),
                    [9.579117366740002,
                     7.972322416776259,
                     8.2245287740603779,
                     9.212707985134525])
    assert_allclose(fst_get('trunk_section_lengths', NEURON, neurite_type=NeuriteType.apical_dendrite),
                    [9.212707985134525])
    assert_allclose(fst_get('trunk_section_lengths', NEURON, neurite_type=NeuriteType.basal_dendrite),
                    [7.972322416776259, 8.2245287740603779])
    assert_allclose(fst_get('trunk_section_lengths', NEURON, neurite_type=NeuriteType.axon),
                    [9.579117366740002])
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:12,代码来源:test_get_features.py


示例8: test_trunk_origin_radii

def test_trunk_origin_radii():
    assert_allclose(fst_get('trunk_origin_radii', NEURON),
                    [0.85351288499400002,
                     0.18391483031299999,
                     0.66943255462899998,
                     0.14656092843999999])

    assert_allclose(fst_get('trunk_origin_radii', NEURON, neurite_type=NeuriteType.apical_dendrite),
                    [0.14656092843999999])
    assert_allclose(fst_get('trunk_origin_radii', NEURON, neurite_type=NeuriteType.basal_dendrite),
                    [0.18391483031299999,
                     0.66943255462899998])
    assert_allclose(fst_get('trunk_origin_radii', NEURON, neurite_type=NeuriteType.axon),
                    [0.85351288499400002])
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:14,代码来源:test_get_features.py


示例9: test_segment_meander_angles_pop

def test_segment_meander_angles_pop():

    feat = 'segment_meander_angles'

    nt.ok_(np.allclose(_stats(fst_get(feat, POP)),
                       (0.0, 3.1415926535897931, 14637.977670710961, 2.3957410263029395)))

    nt.ok_(np.allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.all)),
                       (0.0, 3.1415926535897931, 14637.977670710961, 2.3957410263029395)))

    nt.ok_(np.allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite)),
                       (0.326101999292573, 3.0939261437163492, 461.98168732359414, 2.4443475519766884)))

    nt.ok_(np.allclose(_stats(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite)),
                       (0.0, 3.1415926535897931, 2926.2411975307768, 2.4084289691611334)))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:15,代码来源:test_get_features.py


示例10: test_sholl_frequency

def test_sholl_frequency():
    assert_allclose(fst_get('sholl_frequency', NEURON),
                    [4, 8, 8, 14, 9, 8, 7, 7])

    assert_allclose(fst_get('sholl_frequency', NEURON, neurite_type=NeuriteType.all),
                    [4, 8, 8, 14, 9, 8, 7, 7])

    assert_allclose(fst_get('sholl_frequency', NEURON, neurite_type=NeuriteType.apical_dendrite),
                    [1, 2, 2, 2, 2, 2, 1, 1])

    assert_allclose(fst_get('sholl_frequency', NEURON, neurite_type=NeuriteType.basal_dendrite),
                    [2, 4, 4, 6, 5, 4, 4, 4])

    assert_allclose(fst_get('sholl_frequency', NEURON, neurite_type=NeuriteType.axon),
                    [1, 2, 2, 6, 2, 2, 2, 2])
开发者ID:BlueBrain,项目名称:NeuroM,代码行数:15,代码来源:test_get_features.py


示例11: test_segment_meander_angles_nrn

def test_segment_meander_angles_nrn():

    feat = 'segment_meander_angles'

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN)),
                       (0.326101999292573, 3.129961675751181, 1842.351779156608, 2.4369732528526562)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.all)),
                       (0.326101999292573, 3.129961675751181, 1842.351779156608, 2.4369732528526562)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.apical_dendrite)),
                       (0.326101999292573, 3.0939261437163492, 461.98168732359414, 2.4443475519766884)))

    nt.ok_(np.allclose(_stats(fst_get(feat, NRN, neurite_type=NeuriteType.basal_dendrite)),
                       (0.47318725279312024, 3.129961675751181, 926.33847274926438, 2.4506308802890593)))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:15,代码来源:test_get_features.py


示例12: test_section_path_distances_endpoint

def test_section_path_distances_endpoint():

    ref_sec_path_len_start = list(iter_neurites(NEURON, sec.start_point_path_length))
    ref_sec_path_len = list(iter_neurites(NEURON, sec.end_point_path_length))
    path_lengths = fst_get('section_path_distances', NEURON)
    nt.ok_(ref_sec_path_len != ref_sec_path_len_start)
    nt.eq_(len(path_lengths), 84)
    nt.ok_(np.all(path_lengths == ref_sec_path_len))
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:8,代码来源:test_get_features.py


示例13: test_number_of_sections_nrn

def test_number_of_sections_nrn():

    feat = 'number_of_sections'

    nt.assert_items_equal(fst_get(feat, NRN), [84])

    nt.assert_items_equal(fst_get(feat, NRN, neurite_type=NeuriteType.all),
                          [84])

    nt.assert_items_equal(fst_get(feat, NRN, neurite_type=NeuriteType.axon),
                          [21])

    nt.assert_items_equal(fst_get(feat, NRN, neurite_type=NeuriteType.apical_dendrite),
                          [21])

    nt.assert_items_equal(fst_get(feat, NRN, neurite_type=NeuriteType.basal_dendrite),
                          [42])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例14: test_number_of_forking_points_pop

def test_number_of_forking_points_pop():

    feat = 'number_of_forking_points'

    nt.assert_items_equal(fst_get(feat, POP), [40, 20, 98])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.all),
                          [40, 20, 98])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.axon),
                          [10, 10, 88])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite),
                          [10, 0, 0])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite),
                          [20, 10, 10])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例15: test_remote_bifurcation_angles

def test_remote_bifurcation_angles():
    ref_remote_bifangles = list(nf.remote_bifurcation_angles(NEURON))
    remote_bifangles = fst_get('remote_bifurcation_angles', NEURON)
    nt.eq_(len(remote_bifangles), 40)
    assert_allclose(remote_bifangles, ref_remote_bifangles)
    remote_bifangles = fst_get('remote_bifurcation_angles', NEURON, neurite_type=NeuriteType.all)
    nt.eq_(len(remote_bifangles), 40)
    assert_allclose(remote_bifangles, ref_remote_bifangles)

    s = fst_get('remote_bifurcation_angles', NEURON, neurite_type=NeuriteType.axon)
    nt.eq_(len(s), 10)

    s = fst_get('remote_bifurcation_angles', NEURON, neurite_type=NeuriteType.basal_dendrite)
    nt.eq_(len(s), 20)

    s = fst_get('remote_bifurcation_angles', NEURON, neurite_type=NeuriteType.apical_dendrite)
    nt.eq_(len(s), 10)
开发者ID:jdcourcol,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例16: test_number_of_sections_pop

def test_number_of_sections_pop():

    feat = 'number_of_sections'

    nt.assert_items_equal(fst_get(feat, POP), [84, 42, 202])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.all),
                          [84, 42, 202])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.axon),
                          [21, 21, 179])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite),
                          [21, 0, 0])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite),
                          [42, 21, 23])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例17: test_number_of_terminations_pop

def test_number_of_terminations_pop():

    feat = 'number_of_terminations'

    nt.assert_items_equal(fst_get(feat, POP), [44, 22, 103])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.all),
                          [44, 22, 103])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.axon),
                          [11, 11, 90])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite),
                          [11, 0, 0])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite),
                          [22, 11, 13])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例18: test_number_of_bifurcations_pop

def test_number_of_bifurcations_pop():

    feat = 'number_of_bifurcations'

    nt.assert_items_equal(fst_get(feat, POP), [40, 20, 97])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.all),
                          [40, 20, 97])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.axon),
                          [10, 10, 87])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite),
                          [10, 0, 0])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite),
                          [20, 10, 10])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例19: test_number_of_neurites_pop

def test_number_of_neurites_pop():

    feat = 'number_of_neurites'

    nt.assert_items_equal(fst_get(feat, POP), [4, 2, 4])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.all),
                          [4, 2, 4])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.axon),
                          [1, 1, 1])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite),
                          [1, 0, 0])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite),
                          [2, 1, 3])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py


示例20: test_number_of_segments_pop

def test_number_of_segments_pop():

    feat = 'number_of_segments'

    nt.assert_items_equal(fst_get(feat, POP), [840, 419, 5179])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.all),
                          [840, 419, 5179])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.axon),
                          [210, 209, 4508])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.apical_dendrite),
                          [210, 0, 0])

    nt.assert_items_equal(fst_get(feat, POP, neurite_type=NeuriteType.basal_dendrite),
                          [420, 210, 671])
开发者ID:eleftherioszisis,项目名称:NeuroM,代码行数:17,代码来源:test_get_features.py



注:本文中的neurom.fst.fst_get函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.load_neuron函数代码示例发布时间:2022-05-27
下一篇:
Python types.is_type函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap