brian-team / brian2

Brian is a free, open source simulator for spiking neural networks.
http://briansimulator.org
Other
939 stars 220 forks source link

Refractoriness bug #71

Closed thesamovar closed 11 years ago

thesamovar commented 11 years ago

The example I-F_curve_LIF example behaves wrongly now that the refractoriness branch is merged into master.

mstimberg commented 11 years ago

Thanks for spotting this. There was nothing actually wrong with the refractoriness as such, the example simply made the mistake of still using G.refractory = ... instead of the refractory keyword. This added a new attribute to the object, something that we probably want to forbid at some point, even though it could make things a bit annoying in our own code. What made the whole thing a bit odd, is that not specifying the refractory duration/condition lead to the neuron never leaving refractoriness. I changed the default for refractory to False, so that now it would immediately leave it, i.e. the default is now identical to refractory=0*ms. I also added a warning if "unless-refractory" is used, but no refractoriness period is specified. While there are a couple of more conditions to catch (using not_refractory explicitly in the threshold, for example), I think this is the most common and important use case.

thesamovar commented 11 years ago

Great!