brian-team/brian2 — pull request #66 by mstimberg (2013-07-01 13:15:15+00:00)
Title: Finalize the refractoriness mechanism

This should implement the new refractoriness mechanism that came out of our discussion. The major differences to the previous (Brian2) implementation: The flag is called `unless-refractory` instead of `active`, the variable storing the state of neurons is called `not_refractory` instead of `is_active`. Specifying the length of the refractory period works with a new `refractory` keyword in `NeuronGroup`, it accepts a duration or a string that evaluates to a duration or a string that evaluates to a boolean (the condition to stay in the refractory state after a spike). Closes #41
Also includes some tests and a bit of "user documentation".