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

Replace output field with MTK.outputs function and cleanup #507

Merged
merged 32 commits into from
Dec 24, 2024

Conversation

harisorgn
Copy link
Member

Extends ModelingToolkit.outputs(blox) function to return all namespaced variables/parameters tagged with [output=true] in a blox (not system).

Also did a lot of cleanup of unnecessary fields like jcn and voltage and finally renamed odesystem -> system.

@harisorgn harisorgn merged commit 24d304f into master Dec 24, 2024
6 checks passed
@harisorgn harisorgn deleted the ho/output_cleanup branch December 24, 2024 10:10
david-hofmann pushed a commit that referenced this pull request Jan 2, 2025
* reexport t and D from MTK

* add alias for `AbstractNeuronBlox` for brevity

* export functions for easier custom blox+connector definitions

* add generic spike affect and restructure existing one for LIF neurons

* add `system(blox)` to return (simplified) system

* option to choose between namespaced or not input equations in getter function

* add generic Connector dispatch

* add getter functions for spike affect states and params

* remove abstract neuron -> neuron Connector dispatch

* change values in `spike_affects` to `Vector{Tuple}` instead of `Tuple{Vector,Vector}`

* move functional spike affect to `Neurographs.jl`

* add generic fallback for discrete callbacks

* fix typo

* add `weight` argument to `connection_spike_affects`

* import & export `outputs`

* extend `MTK.outputs` util fuction

* remove `output, jcn, voltage` fields, only keep metadata

* apply `outputs` function instead of field access

* rename `odesystem` field to `system`

* wrap `outputs` in `Num`

* capitalize voltage state `V`

* capitalize all occurences of `v` state

* actually capitalize all `v`

* try fixing the GD `output` error

* actually try fixing the GD test

* add `namespaced` kwarg for `outputs`

* fix output tag in PING neurons

* default to `namespaced=false` for shorter `outputs` return

* also expand equations, inputs, unknowns, parameters from MTK to work with blox

* use namespaced system in system util funcs
david-hofmann pushed a commit that referenced this pull request Jan 3, 2025
* reexport t and D from MTK

* add alias for `AbstractNeuronBlox` for brevity

* export functions for easier custom blox+connector definitions

* add generic spike affect and restructure existing one for LIF neurons

* add `system(blox)` to return (simplified) system

* option to choose between namespaced or not input equations in getter function

* add generic Connector dispatch

* add getter functions for spike affect states and params

* remove abstract neuron -> neuron Connector dispatch

* change values in `spike_affects` to `Vector{Tuple}` instead of `Tuple{Vector,Vector}`

* move functional spike affect to `Neurographs.jl`

* add generic fallback for discrete callbacks

* fix typo

* add `weight` argument to `connection_spike_affects`

* import & export `outputs`

* extend `MTK.outputs` util fuction

* remove `output, jcn, voltage` fields, only keep metadata

* apply `outputs` function instead of field access

* rename `odesystem` field to `system`

* wrap `outputs` in `Num`

* capitalize voltage state `V`

* capitalize all occurences of `v` state

* actually capitalize all `v`

* try fixing the GD `output` error

* actually try fixing the GD test

* add `namespaced` kwarg for `outputs`

* fix output tag in PING neurons

* default to `namespaced=false` for shorter `outputs` return

* also expand equations, inputs, unknowns, parameters from MTK to work with blox

* use namespaced system in system util funcs
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.

1 participant