nest / nest-simulator

The NEST simulator
http://www.nest-simulator.org
GNU General Public License v2.0
539 stars 365 forks source link

mat2_psc_exp not spiking #134

Closed bosse89 closed 8 years ago

bosse89 commented 8 years ago

I'm using mat2_psc_exp/amat2_psc_exp with default settings trying to just make it spike. Testing similar currents at http://www.ton.scphys.kyoto-u.ac.jp/~shino/toolbox/kspred/pred.html which spikes nice.

Here is some test code:

import nest import pylab nest.ResetKernel() neuron = nest.Create("mat2_psc_exp") nest.SetStatus(neuron, {"I_e": 500.0})#external current multimeter = nest.Create("multimeter") nest.SetStatus(multimeter, {"withtime":True, "record_from":["V_m"]}) spikedetector = nest.Create("spike_detector", params={"withgid": True, "withtime": True}) nest.Connect(multimeter, neuron) nest.Connect(neuron, spikedetector) nest.Simulate(1000.0) dmm = nest.GetStatus(multimeter)[0] Vms = dmm["events"]["V_m"] ts = dmm["events"]["times"] pylab.figure(1) pylab.plot(ts, Vms) dSD = nest.GetStatus(spikedetector,keys='events')[0] evs = dSD["senders"] ts = dSD["times"] pylab.figure(2) pylab.plot(ts, evs, ".") pylab.show()

nest.GetStatus(neuron)

As you will notice the voltage shows no spikes but ofc spikes are detected if current is over the threshold. Trying same code with for e.g. iaf_neuron or izhikechivh gives spikes as expected

heplesser commented 8 years ago

@bosse89 The mat2 and amat2 models behave differently than most other neuron models: The membrane potential V_m is never reset. Instead, the threshold V_th jumps (usually up) after each spike, see e.g., Fig 1 in Kobayashi et al (2009) og Fig 6 and 7 in Yamauchi et al (2011). So you should record and plot V_th in addition to V_m in order to get the full picture.

At least for amat2, we have not been able to reproduce all graphs in Fig 6 and 7 of Yamauchi et al (2011) with the parameters given in that paper.

bosse89 commented 8 years ago

Thank you for the answer. I see, so the way that the spikedetector works with the MAT model is that it looks at V_th spikes instead of V_m? It defenitely makes more sense when plotting V_th from a spike predicting perspective. But from a biological perspective ... isn't the whole point to make V_m spike and not V_th? ################################################################ import nest import pylab nest.ResetKernel() neuron = nest.Create("mat2_psc_exp") nest.SetStatus(neuron, {"I_e": 400.0})#external current multimeter = nest.Create("multimeter") nest.SetStatus(multimeter, {'interval': 0.1, 'record_from': ['V_m','V_th']}) spikedetector = nest.Create("spike_detector", params={"withgid": True, "withtime": True}) nest.Connect(multimeter, neuron) nest.Connect(neuron, spikedetector) nest.Simulate(1000.0) dmm = nest.GetStatus(multimeter)[0] Vms = dmm["events"]["V_m"] Vths = dmm["events"]["V_th"] ts = dmm["events"]["times"] pylab.figure(1) pylab.plot(ts, Vms) pylab.plot(ts, Vths) dSD = nest.GetStatus(spikedetector,keys='events')[0] evs = dSD["senders"] ts = dSD["times"] pylab.figure(2) pylab.plot(ts, evs, ".") pylab.show() ##############################################################

heplesser commented 8 years ago

@bosse89 The spike detector works by recording the spikes emitted by a neuron, not by looking at the internals of a neuron. Most neuron models in NEST are highly abstract mathematical models of neuronal dynamics. It makes no sense to assign "spiking" to either V_m and V_th.

Since this discussion is not about technical problems in NEST but about usage and general principles of neuronal modeling, it is not a NEST simulator issue suitable for GitHub, but rather for the NEST User mailing list. Please close this issue.

bosse89 commented 8 years ago

Thanks a lot for the help Hans!