{"action":"opened","issue":{"url":"https://api.github.com/repos/brian-team/brian2/issues/777","repository_url":"https://api.github.com/repos/brian-team/brian2","labels_url":"https://api.github.com/repos/brian-team/brian2/issues/777/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/777/comments","events_url":"https://api.github.com/repos/brian-team/brian2/issues/777/events","html_url":"https://github.com/brian-team/brian2/issues/777","id":189444455,"number":777,"title":"`SpikeMonitor` recording from subgroups on weave can record spikes it shouldn't record","user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"labels":[{"id":20465124,"url":"https://api.github.com/repos/brian-team/brian2/labels/bug","name":"bug","color":"fc2929","default":true},{"id":42520104,"url":"https://api.github.com/repos/brian-team/brian2/labels/high%20priority","name":"high priority","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-15T16:45:17Z","updated_at":"2016-11-15T16:45:17Z","closed_at":null,"body":"Argh, I just found another bug, very similar to #772. This time it is about `SpikeMonitor` and it also affects recording from subgroups. To trigger it you need a similar situation as for #772: record from a subgroup and have no neuron in that subgroup spike during that time step. However, you also need to:\r\n* use the weave target (in contrast to #772, Cython and C++ standalone are not affected)\r\n* record from a subgroup in the middle of a group\r\n\r\nAlso, the error should have been pretty obvious, except when only asking the `SpikeMonitor` for its total number of spikes: the erroneously recorded spikes have indices that are outside of the range of the subgroup. For example, with `SpikeMonitor(group[100:200])` you should get indices in the range `[0, 100[`, but due to this bug you could record spikes with indices `>=100`.\r\n\r\nThe fix is trivial, I'll open a PR right away."}}
{"actor":{"display_login":"mstimberg"}}