-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…{Vector,Vector}`
…oblox.jl into ho/output_cleanup
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andvoltage
and finally renamedodesystem -> system
.