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

LIF Demo not working #61

Open
mapi1 opened this issue Mar 20, 2023 · 2 comments
Open

LIF Demo not working #61

mapi1 opened this issue Mar 20, 2023 · 2 comments
Labels

Comments

@mapi1
Copy link

mapi1 commented Mar 20, 2023

Thank you for this great package and bringing ModelingToolkit to the world of neuronal modeling! I was interested in simple threshold based neuron models (QIF, Izhikevich), so I started out with the LIF demo in order to adopt it later on. But it seems sth changed in the meantime, causing the following error with the current version @main and Julia 1.8:

ERROR: MethodError: no method matching CompartmentSystem(::Conductor.LIF; name=:stim_neuron)

And in general, how would you describe the current state of this package? E.g. would you already welcome contributions for other models to build up a zoo or is there a lot of change in the overall structure to be expected, so this would only cause overhead in adjustments all the time?

@wsphillips
Copy link
Owner

The LIF model needs to be reworked, both the demo and supporting backend. Sorry--it should have been temporarily redacted. It was written before some more recent changes were implemented. Originally the LIF model was coded explicitly in Conductor.jl, but I'm trying to avoid hard coding model equations into the backend going forward and instead separate concrete models from the core library.

To get LIF working "the right way":

  • With callbacks/events now implemented, the next step would involve writing a CompartmentSystem method that accepts a voltage reset functor which can be subsequently used to create a callback set analogous to the way synapses work.

  • Since LIF neurons are typically specified as populations, Population needs some work (currently stale/unexported placeholder code). Population is intended to work like NeuronGroup in Brian2, letting one specify n total neurons in one call.

There's still development going on and things may change before v1.0 gets tagged, but contributions are absolutely welcome. Generally, examples are helpful because they become test cases that help guide design decisions. This could even be as simple as a gist of mock code showing what you would want to do, even if it does not yet work.

@mapi1
Copy link
Author

mapi1 commented Mar 23, 2023

Thank you very much for this detailed answer. I saw that you already started a PR related to Population, which is great. I think it will take me some time to understand the codebase, but I will set aside some time to follow your references and attempt to get something running.

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

2 participants