questions on event and NET_RECEIVE block
Posted: Sat Nov 10, 2007 9:27 pm
Hi, I'm studying the event method now. I'm confused by some questions on how the event works
1. Here is a model by Ted
http://senselab.med.yale.edu/modeldb/Sh ... sexpsn.mod
So the INITIAL will only occurs once and at the beginning of the per-stream. By a stream, does that mean a single simulation cycle of NEURON? For instance, if we wanna run 10 trials, one trial is exactly one run. So in the above code, INITIAL only is applied at the beginning of 10 TRIALS rather than each RUN. But the INITIAL block in the MOD file is applied for each RUN, i.e., at the beginning of each run.
Thus, if I run the above code for 10 trials in one single simulation cycle. Results should be
F = 1 for the 1st trial, F = XXX in the following trials
If I put F=1 in the INITIAL block of MOD file rather than the INITIAL of the NET_RECEIVE block, results should be
F = 1 for every trials
So the stream is for each simulation cycle, not each run. I found that's true after I did a experiment. Is that right?
2. Whenever an event is triggered in NET_RECEIVE block, will this event only follow this stream by exact flags we set? Let's take an example,
in the above code, my LIF cell has a spike duration as 1ms, i.e., if v>thr, I set v=40 mv for 1 ms. My question is that during this spike duration time, obviously v>Thr, so do this deliver another event? Or the next event only happens after the first event go over all these three flags?
suppose the fixed dt=0.1, v>thr at t=0, then t=0.1, we'll has v>thr. Do we have another event at t=0.1? If not, when we will have second event?
Hope I said these clearly, thanks.
[/code]
1. Here is a model by Ted
http://senselab.med.yale.edu/modeldb/Sh ... sexpsn.mod
Code: Select all
INITIAL {
: these are in NET_RECEIVE to be per-stream
F = 1
D1 = 1
D2 = 1
tsyn = t
: this header will appear once per stream
: printf("t\t t-tsyn\t F\t D1\t D2\t amp\t newF\t newD1\t newD2\n")
}Thus, if I run the above code for 10 trials in one single simulation cycle. Results should be
F = 1 for the 1st trial, F = XXX in the following trials
If I put F=1 in the INITIAL block of MOD file rather than the INITIAL of the NET_RECEIVE block, results should be
F = 1 for every trials
So the stream is for each simulation cycle, not each run. I found that's true after I did a experiment. Is that right?
2. Whenever an event is triggered in NET_RECEIVE block, will this event only follow this stream by exact flags we set? Let's take an example,
Code: Select all
NET_RECEIVE(weight, nspike, on) {
if (flag == 1) {
WATCH (v > Thr ) 2 : threshod reached?
} else if (flag == 2) {
net_event(t) : deliver a message
on = 1
lastspike = t
nspike = nspike +1 :spike counted
v = vON : 40 mv
net_send(spikedur, 3)
} else if (flag == 3) { : spike off, refactory period on
v = vOFF : -60 mv
on = 0
} suppose the fixed dt=0.1, v>thr at t=0, then t=0.1, we'll has v>thr. Do we have another event at t=0.1? If not, when we will have second event?
Hope I said these clearly, thanks.
[/code]