| 1 | """ |
|---|
| 2 | Simple test to compare iaf_neuron in NEST with StandardIF in NEURON. |
|---|
| 3 | |
|---|
| 4 | Andrew Davison, UNIC, CNRS |
|---|
| 5 | May 2006 |
|---|
| 6 | |
|---|
| 7 | $Id$ |
|---|
| 8 | """ |
|---|
| 9 | |
|---|
| 10 | import sys |
|---|
| 11 | |
|---|
| 12 | if hasattr(sys,"argv"): # run using python |
|---|
| 13 | simulator = sys.argv[-1] |
|---|
| 14 | else: |
|---|
| 15 | simulator = "oldneuron" # run using nrngui -python |
|---|
| 16 | |
|---|
| 17 | exec("from pyNN.%s import *" % simulator) |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | setup(timestep=0.025,min_delay=0.025) |
|---|
| 21 | |
|---|
| 22 | ifcell = create(IF_cond_alpha, {'i_offset' : 0., 'tau_refrac' : 5.0, |
|---|
| 23 | 'v_thresh' : -51.0, 'tau_syn_E' : 5.0, |
|---|
| 24 | 'tau_syn_I': 3.0, 'v_reset' : -70.0, |
|---|
| 25 | 'e_rev_E' : 0., 'e_rev_I' : -80.}) |
|---|
| 26 | |
|---|
| 27 | spike_source1 = create(SpikeSourceArray, {'spike_times': [float(i) for i in range(5,105,10)]}) |
|---|
| 28 | spike_source2 = create(SpikeSourceArray, {'spike_times': [float(i) for i in range(10,110,10)]}) |
|---|
| 29 | |
|---|
| 30 | connect(spike_source1,ifcell,weight=0.006,synapse_type='excitatory') |
|---|
| 31 | connect(spike_source2,ifcell,weight=0.02,synapse_type='inhibitory') |
|---|
| 32 | |
|---|
| 33 | ### Inhibitory synapses not taken into account in NEST ?? |
|---|
| 34 | #connect(spike_source,ifcell,weight=0.067,synapse_type='inhibitory') |
|---|
| 35 | |
|---|
| 36 | record_v(ifcell,"IF_cond_alpha_%s.v" % simulator) |
|---|
| 37 | run(100.0) |
|---|
| 38 | |
|---|
| 39 | end() |
|---|
| 40 | |
|---|