Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refractoriness always in threshold.py #116

Merged
merged 2 commits into from
Sep 17, 2013

Conversation

mstimberg
Copy link
Member

This implements the automatic addition of "not_refractory" to the threshold condition. It also shows a problem with this approach, though: PoissonGroup doesn't use the refractory period but since not_refractory is reset in the state updater, it needs a crazy almost empty state updater to reset the not_refractory variable at every time step. Obviously we want to handle this better, maybe specific templates for thresholds/state updates without refractoriness.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 54de343 on refractoriness_always_in_threshold.py into 00e7ecd on master.

@thesamovar
Copy link
Member

I'm wondering if we can make PoissonGroup not a group, but say PoissonSource derived directly from SpikeSource and not Group.

thesamovar added a commit that referenced this pull request Sep 17, 2013
…shold.py

Refractoriness always in threshold.py
@thesamovar thesamovar merged commit 3e6f519 into master Sep 17, 2013
@thesamovar thesamovar deleted the refractoriness_always_in_threshold.py branch September 17, 2013 17:16
@mstimberg
Copy link
Member Author

I'm wondering if we can make PoissonGroup not a group, but say PoissonSource derived directly from SpikeSource and not Group.

I think there was a good reason for it, but I don't quite remember what the reason was :) One advantage of it being a group is that you can access the rates variable as a state variable. With this comes the possibility of using string expressions in synapses referring it, which might be quite neat. Something like: S.w = 'w0 + 1./rates_pre*w1'. It also means you can set rates with a string expression which allows its use in standalone devices.

@thesamovar
Copy link
Member

Could we do this with a Group instead of a NeuronGroup? And if so, it shouldn't have any refractoriness stuff in there?

@mstimberg
Copy link
Member Author

Could we do this with a Group instead of a NeuronGroup? And if so, it shouldn't have any refractoriness stuff in there?

It's already a Group, not a NeuronGroup but it uses a Threshold object with threshold 'rand() < rates * dt' and because the threshold template also sets not_refractory, we do need all the refractoriness stuff. I think we can either make the threshold/state update mechanism more general/flexible (this would also allow to remove refractoriness for models that don't use it) or simply use a specific template for PoissonGroup.

@thesamovar
Copy link
Member

Ah, I see. I think I'd probably prefer to make refractoriness optional in models but only if it doesn't make everything rather complicated.

@mstimberg
Copy link
Member Author

Ah, I see. I think I'd probably prefer to make refractoriness optional in models but only if it doesn't make everything rather complicated.

Maybe we can do it on the template level, i.e. via a keyword provided to the template which then conditionally includes the refractoriness bit?

@thesamovar
Copy link
Member

Sounds good! Can we detect it automatically actually? i.e. if no user code touches the refractory variables then don't bother to have them.

@mstimberg
Copy link
Member Author

Can we detect it automatically actually? i.e. if no user code touches the refractory variables then don't bother to have them.

I think we can quite simply: If the user does not specify the refractory keyword in the NeuronGroup constructor, we don't have refractoriness!

@thesamovar
Copy link
Member

OK should we add an issue for this then?

@mstimberg
Copy link
Member Author

Issue is here: #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants