Page 1 of 1

Izhikevich model: WATCH statement

Posted: Fri Sep 28, 2007 7:41 am
by dperakis
I am interested in adopting izhikevich model in my neuron network as an artificial cell.
Reading the .mod file from the ModelDB site, I have some problem understanding the watch statement (especially what is the 2 after the parenthesis). I understant that it detects the incoming threshold and i guess that then it turns the flag to 2 (is this right?).
How can I use the model as an artificial cell?
PS: I have read the previous messages in the Izhikevich model

Code: Select all

NET_RECEIVE (w) { : The contents of the NET_RECEIVE block specify what happens when an event is delivered to a point process or artificial spiking neuron. 
  if (flag == 1) {
    WATCH (vv>thresh) 2
  } else if (flag == 2) {
    net_event(t)
    vv = c
    u = u+d
  } else { : synaptic activation
    gsyn = gsyn+w
  }
}

Posted: Mon Oct 01, 2007 12:01 pm
by ted
Good question. This needs to be spelled out somewhere.

WATCH (var > thresh) flagvalue
is used in a NET_RECEIVE block to specify a condition in the postsynaptic cell that will
generate a self-event with latency 0 and a specified flag value. If the postsynaptic cell
is a biophysical model cell, var is usually local membrane potential (or cai or some
other concentration); if the postsynaptic cell is an artificial spiking cell, var is one of
that cell's state variables.

So here's how your NET_RECEIVE block works:

If an "ordinary" event arrives (an event with flag 0, which means it's just an input event
conveyed by a NetCon), this artificial spiking cell's gsyn variable is incremented by w.

If an event with flag == 2 arrives, the artificial spiking cell generates an output event, then
updates the values of vv and u.

But what could generate such an event? The condition stipulated by the WATCH statement
WATCH (vv>thresh) 2
This statement makes NEURON monitor the value of vv for positive-going threshold
crossings, i.e. when vv becomes > thresh after having been <= thresh. If such a crossing
occurs, the mechanism generates a self event with latency 0 and flag 2.

A WATCH statement only needs to be executed once, during simulation initialization.
This particular example has an INITIAL block (not shown here) that contains the statement
net_send(0, 1)
which launches a self-event with latency 0 and flag 1 during simulation initialization. This
self-event is delivered to the cell at the start of the simulation, and makes the NET_RECEIVE
block execute the WATCH statement.

Posted: Tue Oct 02, 2007 7:09 am
by dperakis
Many thanks for your really elucidating reply.
I couldn' t realize that the WATCH statement only needs to be executed once, during simulation initialization.
Much informative answer...

Posted: Tue Oct 02, 2007 8:19 am
by ted
Yes, it only needs to be executed at the start of a simulation, but it must be executed at the
start of each simulation.