Bugfix: past spikes were not cleared in NEURON VectorSpikeSource#610
Open
lkoelman wants to merge 2 commits intoNeuralEnsemble:masterfrom
Open
Bugfix: past spikes were not cleared in NEURON VectorSpikeSource#610lkoelman wants to merge 2 commits intoNeuralEnsemble:masterfrom
lkoelman wants to merge 2 commits intoNeuralEnsemble:masterfrom
Conversation
1 similar comment
Upon calling clear_past_spikes() the spike vector was resized, but readout of those spike times by the VecStim mechanism was not re-initialized. This caused the indexing calculation in VecStim to go wrong resulting in erroneous spike timings.
Author
|
I fixed a more serious bug that is more insidious and took me a while to track down. Basically the spikes coming out of a VectorSpikeSource are not valid anymore after you write out data during a simulation. This is because the Vector containing the spikes was resized, but the VecStim mechanism did not adjust its indexing calculation. Caused me a lot of headaches and lost simulation data so hope this gets merged quickly! |
Member
|
Many thanks for this. Please could you add tests for the two issues you've identified here? (in the file |
Author
|
Uh-oh, seems like it is not fixed yet. VecStim does not reset the index to the correct value when calling play() again. I need to modify the VecStim mechanism to reset the index properly. |
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.
This fixed a bug for me when writing out data during a simulation. Without this line, spikes were not cleared and in
recorder._get_current_segmentan error was raised when constructing aneo.SpikeTraincontaining spike times <= recording start time.