Fix synapse clamping#492
Merged
Merged
Conversation
jnsbck
commented
Nov 8, 2024
| externals["i"] = jnp.concatenate([externals["i"], data_stimuli[1]]) | ||
| external_inds["i"] = jnp.concatenate( | ||
| [external_inds["i"], data_stimuli[2].global_comp_index.to_numpy()] | ||
| [external_inds["i"], data_stimuli[2].index.to_numpy()] |
Contributor
Author
There was a problem hiding this comment.
changed to .index, since edges does not have global_comp_index
Contributor
Author
There was a problem hiding this comment.
...and clamping of synapses needs the dataframe index.
This was
linked to
issues
Nov 8, 2024
Contributor
Author
|
fyi @michaeldeistler Also @huangziwei I noticed we have #363 still open? I think this should be easy to do #487 is merged. |
jnsbck
commented
Nov 8, 2024
Comment on lines
+1665
to
+1669
| all_externals = list(self.externals.keys()) | ||
| if "i" in all_externals: | ||
| all_externals.remove("i") | ||
| state_names = all_externals if state_name is None else [state_name] | ||
| for state_name in state_names: |
Contributor
Author
There was a problem hiding this comment.
Took the liberty of making state_name optional. If none is supplied delete_clamps() will just remove all clamps.
michaeldeistler
pushed a commit
that referenced
this pull request
Nov 13, 2024
* add: wip version of tutorial on views * fix: added fixes for clamping and stimulating of synapses * fix: allow all states * fix: add current to states * fix: add tests for current and synapse clamping * fix: fix current clamp test * rm: rm accidently commited stash from different branch * enh: allow to remove multiple clamp * fix: make tests pass
This file contains hidden or 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
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.
Clamping of synaptic states was not tested and slipped through the cracks when #447 was merged. This lead to several issues #485.
This PR fixes this and adds test coverage.