root/trunk/test/IF_cond_alpha.py @ 21

Revision 21, 1.2 KB (checked in by apdavison, 6 years ago)

Renamed "neuron" module to "oldneuron"

  • Property svn:executable set to *
Line 
1"""
2Simple test to compare iaf_neuron in NEST with StandardIF in NEURON.
3
4Andrew Davison, UNIC, CNRS
5May 2006
6
7$Id$
8"""
9
10import sys
11
12if hasattr(sys,"argv"):     # run using python
13    simulator = sys.argv[-1]
14else:
15    simulator = "oldneuron"    # run using nrngui -python
16
17exec("from pyNN.%s import *" % simulator)
18
19
20setup(timestep=0.025,min_delay=0.025)
21
22ifcell = 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
27spike_source1 = create(SpikeSourceArray, {'spike_times': [float(i) for i in range(5,105,10)]})
28spike_source2 = create(SpikeSourceArray, {'spike_times': [float(i) for i in range(10,110,10)]})
29
30connect(spike_source1,ifcell,weight=0.006,synapse_type='excitatory')
31connect(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   
36record_v(ifcell,"IF_cond_alpha_%s.v" % simulator)
37run(100.0)
38
39end()
40
Note: See TracBrowser for help on using the browser.