""" A 5 5 oscillator from the 1ms Izhikevich model. The only parameter modified in the I model is a from .02 -> .05. Once turned on the oscillator has a couple of quick spikes, then each set takes 10ms to fire. This is twice as fast than the FLIF ones. """ from pyNN.utility import get_script_args, normalized_filename #from neo.io import NeoHdf5IO from neo.io import PyNNTextIO #from neo import io #DELAY = 10.0 DELAY = 1.0 SIM_LENGTH = 200.0 simulator_name = get_script_args(1)[0] exec("from pyNN.%s import *" % simulator_name) setup(timestep=DELAY,min_delay=DELAY,max_delay=DELAY,debug=True) #input neurons #default a .02, b .2, c -65, d 2.0, i_offset 0 cell_params = {'a' : 0.05} aPop = Population(5,Izhikevich(**cell_params)) bPop = Population(5,Izhikevich(**cell_params)) #set up clamped input pulse = DCSource(amplitude=0.0055, start=0.0, stop=10) inputAssembly = Assembly(aPop[0,1,2,3,4]) pulse.inject_into(inputAssembly) #setup connections synWeight = 6.0 connE = connect(aPop, bPop, weight=synWeight, delay=DELAY) connE = connect(bPop, aPop, weight=synWeight, delay=DELAY) #connI = connect(inpPop[1], outCell,weight=-2.0, delay=DELAY) #setup recording aPop.record(['spikes','v']) bPop.record(['spikes','v']) print aPop[0].get_parameters() run(SIM_LENGTH) print "A" outDat = aPop.get_data() for seg in outDat.segments: print(seg.spiketrains) # print(seg.analogsignalarrays) print "B" outDat = bPop.get_data() for seg in outDat.segments: print(seg.spiketrains) # print(seg.analogsignalarrays) end()