wsphillips / Conductor.jl

Choo-choo
MIT License
60 stars 12 forks source link

LIF Demo not working #61

Open mapi1 opened 1 year ago

mapi1 commented 1 year ago

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 commented 1 year ago

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":

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 commented 1 year ago

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.