Ticket #159: failing.py

File failing.py, 0.9 KB (added by bruederle, 2 years ago)
Line 
1import pyNN.nest as pynn
2
3import numpy
4import pylab
5
6pynn.setup(timestep=0.1)
7
8numCellsExc = 2
9numCellsInh = 2 
10
11w_exc = 0.0002 # uS
12w_inh = 0.0008 # uS
13
14expDuration = 1000 # msec
15
16if_cond_exp_params = { 
17    'tau_m'         : 20.0,     
18    'i_offset'      :  0.1,
19    'tau_refrac'    :  3.0,
20    'v_thresh'      :-63.0,
21    'tau_syn_E'     : 30.0,
22    'tau_syn_I'     : 30.0,
23    'v_reset'       :-69.0,
24    'e_rev_E'       :  0.,
25    'e_rev_I'       :-70.,
26    'v_init'        :-70.0
27}
28
29cells_exc = pynn.create(pynn.IF_cond_exp, if_cond_exp_params, n=numCellsExc)
30cells_inh = pynn.create(pynn.IF_cond_exp, if_cond_exp_params, n=numCellsInh)
31
32pynn.connect(source=cells_inh, target=cells_exc, weight=w_inh, synapse_type='inhibitory')
33pynn.connect(source=cells_inh, target=cells_inh, weight=w_inh, synapse_type='inhibitory')
34
35pynn.record(cells_exc, 'spikes_nest.dat')   
36
37pynn.run(expDuration)
38pynn.end() 
39
40
41