chungheng / neural

Python implementation of a collection of neuron and synapse models
2 stars 1 forks source link

make recorder record spike counts for all time steps. #10

Closed TK-21st closed 3 years ago

TK-21st commented 3 years ago

Changed the recorder in the following ways:

  1. the index % self.rate == 0 check is moved into the update call for each recorder as opposed to being inside the __iter__ only. This change makes sure that the behavior for update and next(iter()) is consistent
  2. For attrs that has spike in its name, they are treated as spike variables. When rate > 1, spike variables are accumulated for each step to return to total spike count instead of binary value of whether a spike is present or not. This addresses #8 part 2.