Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoff committed Apr 25, 2017
1 parent ddbd003 commit 4c9f95d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/poisson_dbl_exp_neuron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ u_rise_inh_(0.0),
u_fall_inh_(0.0),
u_membrane_(0.0),
input_current_(0.0),
adaptative_threshold_(0.0),
adaptive_threshold_(0.0),
r_(0)
{
}
Expand All @@ -145,7 +145,7 @@ r_(0)
void PoissonDblExpNeuron::State_::get(DictionaryDatum& d, const Parameters_&) const
{
def<double>(d, nest::names::V_m, u_membrane_); // Membrane potential
def<double>(d, "adaptive_threshold", adaptative_threshold_);
def<double>(d, "adaptive_threshold", adaptive_threshold_);
}

/**
Expand All @@ -154,7 +154,7 @@ void PoissonDblExpNeuron::State_::get(DictionaryDatum& d, const Parameters_&) co
void PoissonDblExpNeuron::State_::set(const DictionaryDatum& d, const Parameters_&)
{
updateValue<double>(d, nest::names::V_m, u_membrane_);
updateValue<double>(d, "adaptive_threshold", adaptative_threshold_);
updateValue<double>(d, "adaptive_threshold", adaptive_threshold_);
}

//
Expand Down Expand Up @@ -316,7 +316,7 @@ void PoissonDblExpNeuron::update(nest::Time const& origin, const long from, cons

nest::Time time = nest::Time::step(origin.get_steps() + lag);

S_.adaptative_threshold_ -= 1e-3 * V_.h_ * P_.target_rate_ * P_.target_adaptation_speed_;
S_.adaptive_threshold_ -= 1e-3 * V_.h_ * P_.target_rate_ * P_.target_adaptation_speed_;

if (S_.r_ == 0)
{
Expand All @@ -325,7 +325,7 @@ void PoissonDblExpNeuron::update(nest::Time const& origin, const long from, cons
// Calculate instantaneous rate from transfer function:
// rate = c1 * u' + c2 * exp(c3 * u')

double V_eff = S_.u_membrane_ - S_.adaptative_threshold_;
double V_eff = S_.u_membrane_ - S_.adaptive_threshold_;

double rate = (P_.c_1_ * V_eff + P_.c_2_ * std::exp(P_.c_3_ * V_eff));
double spike_probability = -numerics::expm1(-rate * V_.h_ * 1e-3);
Expand Down Expand Up @@ -371,7 +371,7 @@ void PoissonDblExpNeuron::update(nest::Time const& origin, const long from, cons
S_.u_fall_inh_ = 0.0;
}

S_.adaptative_threshold_ += P_.target_adaptation_speed_;
S_.adaptive_threshold_ += P_.target_adaptation_speed_;
} // S_.u_membrane_ = P_.V_reset_;
} // if (rate > 0.0)

Expand Down
4 changes: 2 additions & 2 deletions src/poisson_dbl_exp_neuron.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class PoissonDblExpNeuron : public TracingNode
double u_fall_inh_; //!< Falling part of inhibitory potential
double u_membrane_; //!< The membrane potential
double input_current_; //!< The piecewise linear input currents
double adaptative_threshold_; //!< adaptive threshold to maintain average output rate
double adaptive_threshold_; //!< adaptive threshold to maintain average output rate
int r_; //!< Number of refractory steps remaining

State_(); //!< Default initialization
Expand Down Expand Up @@ -330,7 +330,7 @@ class PoissonDblExpNeuron : public TracingNode

double get_E_sfa_() const
{
return S_.adaptative_threshold_;
return S_.adaptive_threshold_;
}

/**
Expand Down

0 comments on commit 4c9f95d

Please sign in to comment.