How to catch the destination cell synaptic event timestamp ?

Moderator: wwlytton

Post Reply
AG

How to catch the destination cell synaptic event timestamp ?

Post by AG »

My purpose is to call a procedure every time a post-synaptic event arises, taking its associated delay into account. For example, if at time t a signal is sent from a source cell and that it takes n ms to reach the destination cell, I would like a procedure to be called at time t+n ms. The only thing I can obtain yet is the time the AP is triggered. Thank you for your help !

AG

Code: Select all

proc catch_it(){
    print t
}
// ---< function triggered (catch_it()) when a pre-synaptic event is detected
soma nclist.object(0).record("catch_it()")
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

How to catch the destination cell synaptic event timestamp ?

Post by Raj »

If you can be slightly more specific as to what you want, it might be possible to provide an answer.

If it comes to implementing a synapse there is an answer, in e.g. implementations of synaptic mechanism in a mod-file the source cell event is handled at a the time of the source event plus a delay time, this delay time can be set via the delay of the netcon object used to specify the connection.

But it seems to me you want to do something different.

Raj
AG

Post by AG »

Dear Raj

Your answer gives me a first possibility to deal with this problem by creating my own modl mechanism and I will try to work in this direction. What I wanted to know was if there already existed a simple way to catch the precise timestamp at which the postsynaptic signal effectively arises at its destination rather than the timestamp at which it was triggered from its source. In other words, when using time delays (e.g. to simulate axonal propagation durations from one source cell triggered at t to a target cell reached at t+Dt with Dt=10ms), I would like my "catch_it()" procedure to be called at t+Dt rather than at t. I must admit that my first question was a bit ambiguous and I would be grateful if you could tell me if such a method exists already or if I have to implement it by myself unsing nmodl. Thanks in advance !

AG.
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

Dear AG,

I don't no know how to do that directly. The netcon class allows you to call a handler (your function catch_it()) when a source event happens using the record method of this class. The delay is specified in the same netcon object which suggests you have all the information at hand to reconstruct the timestamp.

If you only want to register/record information this would yield a workable solution, if you actually want to interfere with the simulation at t+Dt I don't know of a solution without introducing an extra mechanism which only generates a new event at the arrival of event and an extra netcon object connecting to this new mechanism.

Raj
AG

Post by AG »

Thank you for your precious help Raj. I will not spend more time, looking for an inexistent simple solution. I am going to work on a nmodl implementation. Cheers !

AG.
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

I did not say it doesn't exist. So don't come back to me if the experts tell a different story.

Succes with your nmodl implementation!

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

Re: How to catch the destination cell synaptic event timesta

Post by ted »

AG wrote:My purpose is to call a procedure every time a post-synaptic event arises, taking its associated delay into account. For example, if at time t a signal is sent from a source cell and that it takes n ms to reach the destination cell, I would like a procedure to be called at time t+n ms.
Your own code excerpt

Code: Select all

proc catch_it(){
    print t
}
// ---< function triggered (catch_it()) when a pre-synaptic event is detected
soma nclist.object(0).record("catch_it()")
is almost what you want, but it calls catch_it() too soon.

The workaround is to use the CVode class's event() method to insert the necessary
delay. The relevant code then becomes

Code: Select all

soma nclist.object(0).record("insert_delay(delx)")

proc insert_delay() {
  cvode.event(t + $1, "catch_it()")  // execute catch_it() at time t+$1
}
where delx is the delay associated with the NetCon that conveys events to your
synaptic mechanism.

This is a bit of a crude hack, because as written it does not generalize well (what if
you have 10 different cells, each with its own delay?)--although a possible
workaround would be to use one or more sprint statements to assemble command
strings as needed, which you then execute()

An alternative strategy is to revise the model description of your synaptic mechanism
so that every time it receives an event, it calls net_event(t) (i.e. it is now a source of
events that are echoes of the events that it receives). Then your "monitoring"
NetCon (which calls catch_it()) can get its events from the synapse.
AG

Could do the trick ... :-)

Post by AG »

I thank you very much for your exhaustive and detailed answer.I will work on your last suggestion. Could you please just let me know the .mod files involved in this case. Are they:
Exp2Syn
ExpSyn
A syn model of my own ... and
APCount
Thanks !

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

Re: Could do the trick ... :-)

Post by ted »

Depends on what synaptic mechanisms you want to monitor. If you are currently
using ExpSyn and/or Exp2Syn, you need to make your own new mechanisms based
on them. Copy expsyn.mod and exp2syn.mod to the directory where the rest of your
model files for this project are located, rename these mod files (so you don't confuse
them with the standard expsyn.mod and exp2syn.mod), and be sure to change the
names of the mechanisms themselves so that they don't conflict with the built-in
mechanisms.

For example, using "x for extended" the names might become expsynx.mod and
POINT_PROCESS ExpSynx
Then make the necessary change to the NET_RECEIVE block. For ExpSynx, you
would change

Code: Select all

NET_RECEIVE(weight (uS)) {
        state_discontinuity(g, g + weight)
}
to

Code: Select all

NET_RECEIVE(weight (uS)) {
        state_discontinuity(g, g + weight)
        net_event(t)
}
APCount is irrelevant to what you want to do. Furthermore, it is deprecated, and
shouldn't be used for development of new models. The recommended way to detect
and count spikes is with the NetCon class's record() method.
AG

Yup !

Post by AG »

Thank you very much for your help Ted (& Raj). It works perfectly and as soon as the implementation is clean, I post it on the Forum.

AG.
Post Reply