Ignore:
Timestamp:
10/05/14 05:49:16 (6 years ago)
Author:
Ivan Raikov
Message:

nemo: bug fixes in NEST templates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/nemo/trunk/templates/NEST-nodes.tmpl

    r31508 r31587  
    9898   if (check_flag(&status, "CVodeInit", 1)) throw CVodeSolverFailure (get_name(), status);
    9999
    100 {% if haskey(defaults,"V_t") %}
     100{% if haskey("V_t" in defaultDefs) %}
    101101
    102102   /* Spike event handler (detects zero-crossing of V-V_t) */
     
    248248   if (check_flag(&status, "IDAInit", 1)) throw IDASolverFailure (get_name(), status);
    249249
    250 {% if haskey(defaults,"V_t") %}
     250{% if ("V_t" in defaultDefs) %}
    251251
    252252   /* Spike event handler (detects zero-crossing of V-V_t) */
     
    391391{
    392392    B_.logger_.init(); 
    393     #{(if iv (sprintf "V_.U_old_ = S_.y_[~A];" iv) "")}
    394     #{(if (lookup-def 't_ref defaults)
    395           "V_.RefractoryCounts_ = Time(Time::ms(P_.t_ref)).get_steps();"
    396           "V_.RefractoryCounts_ = 0;")}
    397 }
    398 
    399 
     393    {% if haskey(stateIndexMap,"v") %}V_.U_old_ = S_.y_[{{attr(stateIndexMap,"v")}}];{% endif %}
     394{% if ("t_ref" in defaultDefs) %}
     395    V_.RefractoryCounts_ = Time(Time::ms(P_.t_ref)).get_steps();
     396{% else %}
     397    V_.RefractoryCounts_ = 0;
    400398{% endif %}
     399}
     400
     401
     402{% endif %}
Note: See TracChangeset for help on using the changeset viewer.