source: project/release/4/nemo/trunk/templates/NEST-emit-spike.tmpl @ 31587

Last change on this file since 31587 was 31587, checked in by Ivan Raikov, 5 years ago

nemo: bug fixes in NEST templates

File size: 757 bytes
Line 
1
2{% if ((ODEmethod == "cvode") or (ODEmethod == "ida")) %}
3   {
4      set_spiketime(Time::ms(tt));
5      SpikeEvent se;
6      for (int i = 0; i < N; i++)
7      {
8          S_.y_[i] = Ith(B_.y,i);
9      }
10      network()->send(*this, se, lag);
11      adjust_zero_crossings(B_.y, {% if abstol %}{{abstol}}{% else %}1e-7{% endif %});
12      continue;
13   }
14
15{% elif ((ODEmethod == "gsl") and ("V_t" in defaultDefs)) %}
16
17         if ( S_.r_ > 0 )
18            S_.r_--;
19         else
20            if (S_.y_[{{attr(stateIndexMap,"v")}}] >= P_.V_t && V_.U_old_ > S_.y_[{{attr(stateIndexMap,"v")}}])
21              {
22                S_.r_ = V_.RefractoryCounts_;
23                set_spiketime(Time::step(origin.get_steps()+lag+1));
24                SpikeEvent se;
25                network()->send(*this, se, lag);
26              }
27
28{% endif %}
Note: See TracBrowser for help on using the repository browser.