open-ephys / GUI

Archived source code for the Open Ephys GUI
https://github.com/open-ephys/plugin-GUI
126 stars 282 forks source link

Spike sorting (Boxes) & tetrodes is not working properly #134

Closed shayo closed 9 years ago

shayo commented 10 years ago

I think there is a bug somewhere. I see waveforms inside the boxes but they are not classified correctly. Probably a useless feature in any case (PCA much more useful if you are recording with tetrodes...) I'll try to dig more into this.

mmyros commented 10 years ago

In my case, the cursor switches rapidly between hand and arrow when inside the box. Related question: Is there currently a way to to see the average waveform? Thanks

shayo commented 10 years ago

The initial bug was fixed (it was related to incorrect bitVolts conversion). Things seem to work fine on my computer: image

Which platform are you using? Are you using the latest version? Currently, there is no way to see the average wave form. I was planning to add that and inter-spike histograms at some point.

mmyros commented 10 years ago

Ah I see. I am using Linux, which is probably the reason I am getting this; also yes, I am using the latest version cloned from github.

Can you think of a way to somehow look at waveforms outside open-ephys? There is no way to access .spike files as they are being written to, is there? I am trying to see if I get any dopamine cells; it's important to know if waveforms look like dopamine cells, because that determines if I need to lower electrodes. Thanks!

Max

On 11 April 2014 13:15, shayo notifications@github.com wrote:

The initial bug was fixed (it was related to incorrect bitVolts conversion). Things seem to work fine on my computer: [image: image]https://cloud.githubusercontent.com/assets/1977614/2682556/d7f110a6-c19c-11e3-99df-448e5c0ae114.png

Which platform are you using? Are you using the latest version? Currently, there is no way to see the average wave form. I was planning to add that and inter-spike histograms at some point.

Reply to this email directly or view it on GitHubhttps://github.com/open-ephys/GUI/issues/134#issuecomment-40227255 .

shayo commented 10 years ago

Right now there isn't a way to display the average wave-form on the fly.

Josh - have you observed the weird mouse behavior Max was describing? I don't have a linux box set up, so I can't debug this.

On Fri, Apr 11, 2014 at 10:21 AM, mmyros notifications@github.com wrote:

Ah I see. I am using Linux, which is probably the reason I am getting this; also yes, I am using the latest version cloned from github.

Can you think of a way to somehow look at waveforms outside open-ephys? There is no way to access .spike files as they are being written to, is there? I am trying to see if I get any dopamine cells; it's important to know if waveforms look like dopamine cells, because that determines if I need to lower electrodes. Thanks!

Max

On 11 April 2014 13:15, shayo notifications@github.com wrote:

The initial bug was fixed (it was related to incorrect bitVolts conversion). Things seem to work fine on my computer: [image: image]< https://cloud.githubusercontent.com/assets/1977614/2682556/d7f110a6-c19c-11e3-99df-448e5c0ae114.png

Which platform are you using? Are you using the latest version? Currently, there is no way to see the average wave form. I was planning to add that and inter-spike histograms at some point.

Reply to this email directly or view it on GitHub< https://github.com/open-ephys/GUI/issues/134#issuecomment-40227255>

.

Reply to this email directly or view it on GitHubhttps://github.com/open-ephys/GUI/issues/134#issuecomment-40227830 .

jsiegle commented 10 years ago

I'm not getting any strange mouse behavior on Linux. Max, can you describe the problem in more detail?

It would be fairly straightforward to make the SpikeDisplayCanvas show average waveforms. In WaveAxes::plotSpike(), rather than drawing the individual spikes, it would add the new spike to the average waveform [(meanSpike*(n-1) + newSpike)/n] and plot that instead. Want to give it a shot, Max?

mmyros commented 10 years ago

Josh, thanks for the suggestion. I gave it a shot today, working through a couple of issues but you are right, that's not a very hard task. However, what I really wanted was an average waveform for each spike sorted unit, which I think may be more difficult.

As for the bug, the problem is that once I create a box and hover the mouse over it, waveform drawing slows down dramatically. At the same time, the way the cursor looks switches rapidly between the "box resize" mode (cursor looks like an arrow pointing to a bar) and the "move box" (cursor looks like a hand) mode and back. What window manager are you using? Perhaps my bug has to do with my fairly exotic WM (awesome). I will try KDE and Gnome as soon as I get to a box that has them.

Another difficulty with the spikesorting branch I have is that it produces no audio. When I just start it up, I get a loud popping sound, then nothing. Master branch doesn't have this issue. Gdb provides no clues. I have ALSA but no PulseAudio. Is there a difference between how the two branches use audio?

Thanks!

Max

On 13 April 2014 14:44, Josh Siegle notifications@github.com wrote:

I'm not getting any strange mouse behavior on Linux. Max, can you describe the problem in more detail?

It would be fairly straightforward to make the SpikeDisplayCanvas show average waveforms. In WaveAxes::plotSpike(), rather than drawing the individual spikes, it would add the new spike to the average waveform [(meanSpike*(n-1) + newSpike)/n] and plot that instead. Want to give it a shot, Max?

Reply to this email directly or view it on GitHubhttps://github.com/open-ephys/GUI/issues/134#issuecomment-40315760 .

shayo commented 10 years ago

Hi Max,

On Sun, Apr 13, 2014 at 7:08 PM, mmyros notifications@github.com wrote:

Josh, thanks for the suggestion. I gave it a shot today, working through a couple of issues but you are right, that's not a very hard task. However, what I really wanted was an average waveform for each spike sorted unit, which I think may be more difficult.

I think it should be implemented in the Spike Sort module. Once I finish my current edits of FPGA module, I will give that a shot.

As for the bug, the problem is that once I create a box and hover the mouse over it, waveform drawing slows down dramatically. At the same time, the way the cursor looks switches rapidly between the "box resize" mode (cursor looks like an arrow pointing to a bar) and the "move box" (cursor looks like a hand) mode and back. What window manager are you using? Perhaps my bug has to do with my fairly exotic WM (awesome). I will try KDE and Gnome as soon as I get to a box that has them.

Another difficulty with the spikesorting branch I have is that it produces no audio. When I just start it up, I get a loud popping sound, then nothing. Master branch doesn't have this issue. Gdb provides no clues. I have ALSA but no PulseAudio. Is there a difference between how the two branches use audio?

Audio has been disabled on the spike sorting branch. I think it either significantly slowed things down or crashed the system. I use the analog out now for audio. Spike sorting will automatically switch audio out for the current channel you are spike sorting.

-- Shay

Thanks!

Max

On 13 April 2014 14:44, Josh Siegle notifications@github.com wrote:

I'm not getting any strange mouse behavior on Linux. Max, can you describe the problem in more detail?

It would be fairly straightforward to make the SpikeDisplayCanvas show average waveforms. In WaveAxes::plotSpike(), rather than drawing the individual spikes, it would add the new spike to the average waveform [(meanSpike*(n-1) + newSpike)/n] and plot that instead. Want to give it a shot, Max?

Reply to this email directly or view it on GitHub< https://github.com/open-ephys/GUI/issues/134#issuecomment-40315760>

.

Reply to this email directly or view it on GitHubhttps://github.com/open-ephys/GUI/issues/134#issuecomment-40328230 .

mmyros commented 10 years ago

I think it should be implemented in the Spike Sort module. Once I finish my current edits of FPGA module, I will give that a shot.

Great!

I use the analog out now for audio

That's an awesome idea! It works very well. Thanks.

jsiegle commented 9 years ago

The issue with the rapidly switching cursor were fixed by changing the logic within WaveformAxes::isOverUnitBox in SpikeSorterCanvas.cpp. It should update smoothly now.