How to recognize the source of a spike in NET_RECEIVE?

Moderator: wwlytton

Post Reply
BlueBirdFlies
Posts: 3
Joined: Thu Jun 13, 2013 11:00 am

How to recognize the source of a spike in NET_RECEIVE?

Post by BlueBirdFlies »

Is there a way to find out the id of the cell that generated a spike within the NET_RECEIVE statement? I guess one way would be to use the weight information and assign unique weights to netcon objects. Is there any other way?

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

Re: How to recognize the source of a spike in NET_RECEIVE?

Post by ted »

A NetCon's weight parameter is actually a Vector if the NetCon is attached to a mechanism whose NET_RECEIVE statement names more than one variable. The first element in the vector is the "weight" itself. The other elements are visible to hoc (or Python) as weight[1]...weight[N-1] where N is the number of arguments in the NET_RECEIVE statement. Usually the other elements are used to store stream-specific
"intermediate variables" e.g. keeping track of the last time a synapse was active for the purpose of implementing use-dependent plasticity. However, you could also use them in other ways.

For example, suppose you have a synaptic mechanism class called MySyn whose NMODL source code contains this NET_RECEIVE statement
NET_RECEIVE (weight, srcid) {
During model setup, when you create each cell you'd also assign a unique id to each spike source. Then when it comes time to set up the connections between spike sources and targets, you'd do something like this:
objref nc
nc = new NetCon(precell, postcell.syn) // syn is an instance of MySyn
nc.weight = some peak conductance value
nc.weight[1] = precell.id // an integer that specifies the identity of the spike source
Post Reply