Create an izhikevich Neuron
Vafa-Andalibi opened this issue · 5 comments
Hello,
I intend to create an ensemble with just 1 neuron but with izhikevich firing pattern. Could you please give me some hints?
This should work, although I've never really used the Izhikevich neurons much. You can play around with the parameters of the neuron by passing arguments to the IzhikevichSpikeGenerator
constructor.
import nef
from ca.nengo.model.neuron.impl import IzhikevichSpikeGenerator
net = nef.Network()
ens = net.make("test", 1, 1)
for n in ens.getNodes():
n.setGenerator(IzhikevichSpikeGenerator())
Thank you in advance for your answer, it works. However, in interactive plot, I can only get the plot for "value" and none of the "voltage grid" , "voltage graph" , "firing rate" , "spike raster" and "tuning curves" works for that ensemble. Do you know what is the reason?
If you add this line to your code
for n in ens.getNodes():
n.setGenerator(IzhikevichSpikeGenerator())
ens.redefineNodes(ens.getNodes()) # <------
then the spike raster will work. The voltage plotting wasn't working because of a bug in the IzhikevichSpikeGenerator
; I just pushed a fix, so if you update your Nengo distribution it should work.
Hello again ,
I have another question with regard to putting probe over a neuron with command line.
Suppose the Ensemble name is ens and the neuron is selected in GUI, then I do as follows:
pr = ProbeImpl()
pr.connect('ens', that, 'rate', True)
First, I do not know why the probe doesn't show up in GUI (in a form of small triangle).
Then I run the simulation for a couple of seconds. However, when I enter this command :
print pr.getData().getValues()
I just get an empty array. Do you have any idea what the problem is?
The usual way to add probes is via
myNetwork.simulator.addProbe("ens", "rate", True)
See if that works for you.