-
Notifications
You must be signed in to change notification settings - Fork 38
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
Updated firing pattern plot #522
Conversation
If I resize this plot (chrome/linux-mint) it remains black until I hit the pause button. |
Hmm... that seems like the intended behaviour to me, as if you haven't hit play yet, then there have been no spikes, and so the plot should be all black. What do you think it should do? |
Reference of availability: https://developer.mozilla.org/en/docs/Web/CSS/image-rendering
I meant that if I moved or resized the plot while the simulation is running, the plot turned black until I hit the pause button. When I hit the pause button, it froze to the last spike data (as it should) and will start again normally once I press play. The undesired behaviour occurs when moving or resizing the plot. |
This looks like it's not actually anything to do with resizing, but is to do with timing -- if you're running a very simple model and your simulation gets ahead of the display, then the display goes black (much like the value plots used to disappear). I've fixed this in the same way as we fixed the value plots -- all the data gets sent at once. I'm not sure how this interacts with the frame dropping, though, so I'd like to do another round of testing on different machines. @Seanny123, does this fix it on your machine? |
Yep, that fixed the problem on my machine |
def gather_data(self, t, x): | ||
self.max_value = max(self.max_value, np.max(x)) | ||
|
||
# TODO: pass only spiking neurons, using subclass of Nengo.Image? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What Nengo.Image are you talking about? Dammit. Just figured it out by reading more. Maybe note that you're talking about Nengo.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that comment's a bit outdated anyway, as we don't want to just send spike data when we're doing the synapse filter in Nengo. I removed it.
The code LGTM. After it's merged I can start working on #382 |
Cool, and it's worked on the few other machines I've tried, so I'll merge this and see how it goes. |
Here's the latest version of the "sparkle plot" (a.k.a. "spike grid"). This is a rebased version of #152 with a few additions I made for stability. Most of the discussion for this PR was in #152 and this PR continues that one.
Two fixes have been added since the discussion there. First, the time data was being stored completely wrong, so if you tried scrolling backwards in time it just didn't work at all. This is now fixed. Second, it now updates the plot when you change the number of neurons.