Changeset 384
- Timestamp:
- 06/21/08 09:29:19 (5 months ago)
- Files:
-
- trunk/src/nest2/__init__.py (modified) (1 diff)
- trunk/test/IF_cond_alpha.py (modified) (1 diff)
- trunk/test/IF_cond_exp.py (modified) (1 diff)
- trunk/test/VAbenchmarks.py (modified) (1 diff)
- trunk/test/simple_STDP.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/nest2/__init__.py
r383 r384 918 918 # And then copy parameters from its parent 919 919 pop.cellparams = self.cellparams 920 pop.cell = cell_list921 920 pop.first_id = self.first_id 922 idx = pop.cell.flatten() -pop.first_id 921 idx = numpy.array(cell_list).flatten() - pop.first_id 922 pop.cell = self.cell.flatten()[idx].reshape(dims) 923 923 pop.cell_local = self.cell_local[idx] 924 pop.position = self.positions[:,idx]924 pop.positions = self.positions[:,idx] 925 925 return pop 926 927 926 928 927 929 trunk/test/IF_cond_alpha.py
r341 r384 19 19 20 20 21 setup(timestep=0. 01,min_delay=0.01,max_delay=4.0)21 setup(timestep=0.1,min_delay=0.1,max_delay=4.0) 22 22 23 23 ifcell = create(IF_cond_alpha, {'i_offset' : 0.1, 'tau_refrac' : 3.0, trunk/test/IF_cond_exp.py
r341 r384 19 19 20 20 21 setup(timestep=0. 01,min_delay=0.01,max_delay=4.0)21 setup(timestep=0.1,min_delay=0.1,max_delay=4.0) 22 22 23 23 ifcell = create(IF_cond_exp, { 'i_offset' : 0.1, 'tau_refrac' : 3.0, trunk/test/VAbenchmarks.py
r317 r384 38 38 rngseed = 98765 39 39 40 n = 400 0# number of cells40 n = 400 # number of cells 41 41 r_ei = 4.0 # number of excitatory cells:number of inhibitory cells 42 42 pconn = 0.02 # connection probability trunk/test/simple_STDP.py
r341 r384 13 13 if hasattr(sys,"argv"): # run using python 14 14 simulator = sys.argv[-1] 15 else: 16 simulator = "neuron" 15 print simulator 16 #else: 17 # simulator = "neuron" 17 18 #simulator = "neuron" # run using nrngui -python 18 19 … … 43 44 #print prj.getWeights() 44 45 t = 0 45 while t < 50: 46 t = run(1.0) 47 syn_dict = nest.GetConnection([p1[0]], 'stdp_synapse', 0) 48 print "%4.1f %6.4f %7.3f %6.4f" % (t, prj.getWeights()[0], syn_dict['Kplus'], syn_dict['weight']) 46 if simulator == "nest2": 47 while t < 50: 48 t = run(1.0) 49 syn_dict = nest.GetConnection([p1[0]], 'stdp_synapse', 0) 50 print "%4.1f %6.4f %7.3f %6.4f" % (t, prj.getWeights()[0], syn_dict['Kplus'], syn_dict['weight']) 49 51 #run(1000.0) 50 52 p1.printSpikes("simple_STDP_1.ras")

