root/trunk/examples/IF_curr_alpha2.py @ 772

Revision 772, 0.6 KB (checked in by apdavison, 3 years ago)

Attempt to rewrite create(), connect(), etc. in terms of Population and Projection, with the aim of improved maintainability.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Revision Id
RevLine 
[1]1"""
[620]2A single IF neuron with alpha-function shaped, current-based synapses, fed by a
3single spike source.
[1]4
5Andrew Davison, UNIC, CNRS
6May 2006
7
8$Id$
9"""
10
[620]11from pyNN.utility import get_script_args
[1]12
[647]13simulator_name = get_script_args(1)[0] 
[391]14exec("from pyNN.%s import *" % simulator_name)
[1]15
16
[620]17id = setup(timestep=0.01,min_delay=0.1)
[1]18
[97]19ifcells = create(IF_curr_alpha, {'i_offset' : 0.1, 'tau_refrac' : 0.1, 'v_thresh' : -52.2},n=5)
[1]20
21spike_source = create(SpikeSourceArray, {'spike_times': [0.1*float(i) for i in range(1,1001,1)]})
22
23conn = connect(spike_source,ifcells,weight=1.5)
24
[772]25record_v(ifcells[0:1], "Results/IF_curr_alpha2_%s.v" % simulator_name)
[1]26run(100.0)
27
28end()
29
Note: See TracBrowser for help on using the browser.