How to plot variables that exist only in NET_RECEIVE block?

Moderator: wwlytton

Post Reply
YuaY
Posts: 6
Joined: Thu Jul 17, 2008 6:37 am

How to plot variables that exist only in NET_RECEIVE block?

Post by YuaY » Mon Oct 20, 2008 6:27 am

Hello,
I wrote a mod file of artificial neuron with synaptic depression and facilitation.
The mod file contains variables that controls the property of synapse, but these
variables exist only in NET_RECEIVE block. If I want to plot graphs of these
variables, what should I do?

ted
Site Admin
Posts: 5567
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to plot variables that exist only in NET_RECEIVE block?

Post by ted » Mon Oct 20, 2008 10:21 am

Many ways to do this.

1. Use variables that are declared outside the NET_RECEIVE block.

2. If you must use some variable q that exists only inside NET_RECEIVE, then also declare a variable r in the NEURON block, make r ASSIGNED, and insert
r = q
immediately after every statement that assigns a value to q.

3. If some variable s is described by an analytical solution to an ODE, but is only updated inside a NET_RECEIVE block, a plot of s vs. t will look like a staircase and not reveal its "continuous time course between the arrival of events." In such a case, consider providing an auxiliary function

Code: Select all

FUNCTION S() {
  S = expression
}
where expression is a formula that may involve values of t and STATEs at the present moment and perhaps also at the times of one or more previous event arrivals. Then you can call S from hoc during a simulation and use the returned values to produce a graph that appears continuous (except for individual discontinuities caused by each arriving event). For an example see
Hines, M.L. and Carnevale, N.T. Discrete event simulation in the NEURON environment. Neurocomputing 58-60:1117-1122, 2004
which is available from http://www.neuron.yale.edu/neuron/bib/nrnpubs.html

YuaY
Posts: 6
Joined: Thu Jul 17, 2008 6:37 am

Re: How to plot variables that exist only in NET_RECEIVE block?

Post by YuaY » Wed Oct 22, 2008 1:41 am

Thank you very much. But if that artificial cell receives synaptic input from more than 1 NetCon objects, the variable in NET_RECEIVE block will has different value for each NetCon object, and the ASSIGSED variable will returns only one value. Can we plot that variable for each NetCon object separately?

ted
Site Admin
Posts: 5567
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: How to plot variables that exist only in NET_RECEIVE block?

Post by ted » Wed Oct 22, 2008 10:42 am

YuaY wrote:if that artificial cell receives synaptic input from more than 1 NetCon objects, the variable in NET_RECEIVE block will has different value for each NetCon object, and the ASSIGNED variable will returns only one value. Can we plot that variable for each NetCon object separately?
The question makes sense in the context of mechanisms that use the NetCon's weight vector to save stream-specific information in addition to the "weight" itself. NetCon.weight is always a Vector; the number of elements in the Vector depends on the contents of the first line of the NET_RECEIVE block.

For example, I implemented a POINT_PROCESS tmgsyn with use-dependent short-term plasticity of the sort described by
Tsodyks et al.
Synchrony generation in recurrent networks with frequency-dependent synapses.
Journal of Neuroscience 20:RC50:1-5, 2000
The first line of its NET_RECEIVE block is
NET_RECEIVE(weight (umho), y, z, u, tsyn (ms)) {
So if I create a NetCon nc that projects to an instance of tmgsyn, nc would have a weight vector whose elements are known to hoc as nc.weight where index i may range from 0 to 4. The values of these elements correspond to the weight and the "synaptic state variables" y, z, u, and tsyn, in that order.

YuaY
Posts: 6
Joined: Thu Jul 17, 2008 6:37 am

Re: How to plot variables that exist only in NET_RECEIVE block?

Post by YuaY » Fri Oct 24, 2008 5:18 am

Your answer is very clear. Thank you very much again.

Post Reply