Skip to content

Commit

Permalink
BUGFIX: Excluded Out-of-range spikes in GenSpikeListCalc
Browse files Browse the repository at this point in the history
  • Loading branch information
maharjun committed Jun 16, 2016
1 parent b1aad07 commit 667d397
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions getResponsibleSpikes/Headers/getRespSpikes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void getRespSpikes::SimulationClass::GenSpikeListCalc(void) {
// get CurrArrivingSyns;
// for each syn in CurrArrivingSyns:
// GenTime = syn.Delay - TimeRchd
// if GenTime > GenSpikeList[syn.NStart-1].last():
// if GenTime >= StartTime && GenTime > GenSpikeList[syn.NStart-1].last():
// GenSpikeList[syn.NStart-1].push_back(GenTime)

for(uint32_t i=0; i < T; ++i) {
Expand All @@ -23,8 +23,9 @@ void getRespSpikes::SimulationClass::GenSpikeListCalc(void) {
auto &CurrentSpikingSyn = Network[SpikeList.SpikeSynInds[j]];
auto SpikeGenTime = SpikeArrTime - CurrentSpikingSyn.DelayinTsteps;
auto &CurrGenSpikeList = GenSpikeList[CurrentSpikingSyn.NStart-1];
if (CurrGenSpikeList.isempty()
|| CurrGenSpikeList.last() < SpikeGenTime) {
if (SpikeGenTime >= StartTime
&& (CurrGenSpikeList.isempty()
|| CurrGenSpikeList.last() < SpikeGenTime)) {
CurrGenSpikeList.push_back(SpikeGenTime);
}
}
Expand Down

0 comments on commit 667d397

Please sign in to comment.