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

Allow customizable spike events #66

Open
wsphillips opened this issue Apr 12, 2023 · 0 comments
Open

Allow customizable spike events #66

wsphillips opened this issue Apr 12, 2023 · 0 comments
Labels

Comments

@wsphillips
Copy link
Owner

Currently spike events are hard coded to occur when:

  1. Somatic voltage potential exceeds 10mV.
  2. If the compartment is refractory, a spike occurs only if the membrane potential was below threshold on the previous time step. For continuous spike events, this is implicit since the affect is definied for positive-going threshold events.

Both of the above are placeholders. We should ultimately support changing the spike threshold and/or defining arbitrary conditions to be met for a spike event. We should also support setting refractory periods based on elapsed time or other state-based conditions.

Changing the raw threshold for spikes is easy--we can extend the existing spike detection methods with an extra optional argument. At minimum, a time-based refractory period requires caching the time stamp of the last spike. You would then define an event as (pseudocode) V > Vthold && Vprev < Vthold && t - t_lastspike > refractory

Support for arbitrary state conditions could be achieved if a user defines their own functors for spike detection. At minimum, we can enable this by defining abstract supertypes for users to overload. However, this approach is burdensome for the user since it requires working on a lower level, using the vanilla DiffEq callbacks API, instead of the ModelingToolkit.jl symbolic callback interface. I will need to think about this last component some more and likely address it as a separate issue.

@wsphillips wsphillips changed the title Allow user-defined spike threshold and refractory condition Allow customizable spike events Apr 12, 2023
This was referenced Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant