""" This is just a 1ms Izhikevich model that spikes every 10ms. from istanbul. Now use that in the earlier (RetNetI.py) configuration, to get variable behaviour. Variable behaviour with centre off. No firing with it on. No firing with centre off and 4 or less of the surround on. Every 20 ms for 5 or 6 on. Every 11 to 18 ms for 7. Every 10 for all 8 on. """ 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.0, 'b' :0.2, 'c' : -65, 'd' : 0.0 } inpPop = Population(17,Izhikevich(**cell_params)) inpPop.initialize(v=-58.0) #output neuron outCell = create(Izhikevich, {'a' : 0.2, 'i_offset' : 1.0 }) #crh test #set up clamped input pulse = DCSource(amplitude=0.0038, start=0.0, stop=SIM_LENGTH) #inputAssembly = Assembly(inpPop[1,2,3,4,6,7,8,9]) #inputAssembly = Assembly(inpPop[1,2,3,4]) #inputAssembly = Assembly(inpPop[1,2,3,4,6]) #inputAssembly = Assembly(inpPop[1,2,3,4,6,7]) inputAssembly = Assembly(inpPop[1,2,3,4,6,7,8]) #inputAssembly = Assembly(inpPop[1,2,3,4,6,7,8,9]) #inputAssembly = Assembly(inpPop[1,2,3,4,5,6,7,8,9]) pulse.inject_into(inputAssembly) surroundWeight = 3.0 #setup connections connE = connect(inpPop[5], outCell, weight=-25.0, delay=DELAY) connI = connect(inpPop[1], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[2], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[3], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[4], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[6], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[7], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[8], outCell,weight=surroundWeight, delay=DELAY) connI = connect(inpPop[9], outCell,weight=surroundWeight, delay=DELAY) #setup recording inpPop.record(['spikes','v']) outCell.record(['spikes','v']) print inpPop[5].get_parameters() run(SIM_LENGTH) #ifIn = inpPop.get_data() #print(ifIn) #print(ifIn.segments) #for seg in ifIn.segments: # print(seg.spiketrains) # print(seg.analogsignalarrays) outDat = outCell.get_data() for seg in outDat.segments: print(seg.spiketrains) # print(seg.analogsignalarrays) end()