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