Skip to content
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

Merged
merged 14 commits into from
Sep 1, 2015
Merged

Updated firing pattern plot #522

merged 14 commits into from
Sep 1, 2015

Conversation

tcstewar
Copy link
Collaborator

@tcstewar tcstewar commented Aug 8, 2015

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.

@Seanny123
Copy link
Collaborator

If I resize this plot (chrome/linux-mint) it remains black until I hit the pause button.

@tcstewar
Copy link
Collaborator Author

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?

@Seanny123
Copy link
Collaborator

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.

@tcstewar
Copy link
Collaborator Author

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?

@Seanny123
Copy link
Collaborator

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?
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@Seanny123
Copy link
Collaborator

The code LGTM. After it's merged I can start working on #382

@tcstewar
Copy link
Collaborator Author

tcstewar commented Sep 1, 2015

Yep, that fixed the problem on my machine

Cool, and it's worked on the few other machines I've tried, so I'll merge this and see how it goes.

tcstewar added a commit that referenced this pull request Sep 1, 2015
@tcstewar tcstewar merged commit 06045c0 into master Sep 1, 2015
@tcstewar tcstewar deleted the sparkle2 branch September 1, 2015 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants