当前位置: 首页>>代码示例>>Python>>正文


Python brainscales.run函数代码示例

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


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

示例1: test_SpikeSourceArray

 def test_SpikeSourceArray(self):
     spike_times = [50.0]
     p = sim.Population(3, sim.SpikeSourceArray(spike_times=spike_times))
     p2 = sim.Population(3, sim.Hardware_IF_cond_exp())
     syn = sim.StaticSynapse(weight=0.012)
     con = sim.Projection(p, p2, connector=sim.OneToOneConnector(), synapse_type=syn, receptor_type="excitatory")
     spike_times_g = p.get("spike_times")
     p2.record("v")
     sim.run(100.0)
     weights = nan_to_num(con.get("weight", format="array"))
     print weights
     data = p2.get_data().segments[0]
     vm = data.filter(name="v")[0]
     print vm
     Figure(
         Panel(
             weights, data_labels=["ext->cell"], line_properties=[{"xticks": True, "yticks": True, "cmap": "Greys"}]
         ),
         Panel(
             vm,
             ylabel="Membrane potential (mV)",
             data_labels=["excitatory", "excitatory"],
             line_properties=[{"xticks": True, "yticks": True}],
         ),
     ).save("result")
开发者ID:JoelChavas,项目名称:PyNN,代码行数:25,代码来源:test_hardware_brainscales.py

示例2: test_print_v

 def test_print_v(self):
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record_v()
     sim.run(10.0)
     a.write_data = Mock()
     a.print_v("foo.txt")
     a.write_data.assert_called_with('foo.txt', 'v', True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:9,代码来源:test_assembly.py

示例3: test_get_gsyn

 def test_get_gsyn(self):
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record_gsyn()
     sim.run(10.0)
     a.get_data = Mock()
     a.get_gsyn()
     a.get_data.assert_called_with(['gsyn_exc', 'gsyn_inh'], True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:9,代码来源:test_assembly.py

示例4: test_getSpikes

 def test_getSpikes(self):
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record('spikes')
     sim.run(10.0)
     a.get_data = Mock()
     a.getSpikes()
     a.get_data.assert_called_with('spikes', True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:9,代码来源:test_assembly.py

示例5: test_printSpikes

 def test_printSpikes(self):
     # TODO: implement assert_deprecated
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record('spikes')
     sim.run(10.0)
     a.write_data = Mock()
     a.printSpikes("foo.txt")
     a.write_data.assert_called_with('foo.txt', 'spikes', True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:10,代码来源:test_assembly.py

示例6: test_restart_loop

def test_restart_loop():
    extra = {"loglevel": 0, "useSystemSim": True, "hardware": sim.hardwareSetup["one-hicann"]}
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
开发者ID:JoelChavas,项目名称:PyNN,代码行数:12,代码来源:test_hardware_brainscales.py

示例7: test_restart_loop

def test_restart_loop():
    if not have_hardware_brainscales:
        raise SkipTest
    extra = {'loglevel':0, 'useSystemSim': True, 'hardware': sim.hardwareSetup['one-hicann']}
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
    
#def test_several_runs():
    if not have_hardware_brainscales:
        raise SkipTest
开发者ID:Huitzilo,项目名称:PyNN,代码行数:18,代码来源:test_hardware_brainscales.py

示例8: test_SpikeSourceArray

 def test_SpikeSourceArray(self):
     from pyNN.utility.plotting import Figure, Panel
     spike_times = [50.]
     p = sim.Population(3, sim.SpikeSourceArray(spike_times=spike_times))
     p2 = sim.Population(3, sim.Hardware_IF_cond_exp())
     syn = sim.StaticSynapse(weight=0.012)
     con = sim.Projection(p, p2, connector = sim.OneToOneConnector(), synapse_type=syn,receptor_type='excitatory')
     spike_times_g = p.get('spike_times')
     p2.record('v')
     sim.run(100.0)
     weights = nan_to_num(con.get('weight', format="array"))
     print weights
     data = p2.get_data().segments[0]
     vm = data.filter(name="v")[0]
     print vm
     Figure(
         Panel(weights,data_labels=["ext->cell"], line_properties=[{'xticks':True, 'yticks':True, 'cmap':'Greys'}]),
         Panel(vm, ylabel="Membrane potential (mV)", data_labels=["excitatory", "excitatory"], line_properties=[{'xticks': True, 'yticks':True}]),
     ).save("result")
开发者ID:costypetrisor,项目名称:PyNN,代码行数:19,代码来源:test_hardware_brainscales.py

示例9: test_run

 def test_run(self):
     sim.setup(**extra)
     self.assertEqual(sim.run(100.0), 100.0)
开发者ID:Huitzilo,项目名称:PyNN,代码行数:3,代码来源:test_simulation_control.py

示例10: test_mean_spike_count

 def test_mean_spike_count(self):
     p = sim.Population(14, sim.EIF_cond_exp_isfa_ista())
     pv = p[2::3]
     pv.record('spikes')
     sim.run(100.0)
     self.assertEqual(p.mean_spike_count(), 2.0)
开发者ID:Huitzilo,项目名称:PyNN,代码行数:6,代码来源:test_populationview.py

示例11: test_reset

 def test_reset(self):
     sim.setup(**extra)
     sim.run(100.0)
     sim.reset()
     self.assertEqual(sim.get_current_time(), 0.0)
开发者ID:Huitzilo,项目名称:PyNN,代码行数:5,代码来源:test_simulation_control.py


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