In collect_Events, refractory handling is implemented outside the event loop and relies on the loop variable event after iteration.
This causes the refractory condition to be evaluated only for the last processed event, which may lead to incorrect association of refractory information when multiple events are present.
Additionally, relying on a loop variable outside its iteration scope reduces code clarity and maintainability.
Proposed Fix:
Move refractory handling logic inside the event loop so that refractory information is correctly attached to the corresponding event (specifically the "spike" event).
In collect_Events, refractory handling is implemented outside the event loop and relies on the loop variable
eventafter iteration.This causes the refractory condition to be evaluated only for the last processed event, which may lead to incorrect association of refractory information when multiple events are present.
Additionally, relying on a loop variable outside its iteration scope reduces code clarity and maintainability.
Proposed Fix:
Move refractory handling logic inside the event loop so that refractory information is correctly attached to the corresponding event (specifically the "spike" event).