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

Allow quality and template metrics in sortingview's unit table #3299

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

jonahpearl
Copy link
Contributor

Hi all — I'm wondering about the status of sortingview (see magland/sortingview#233), and how close it is to being a phy replacement. In the meantime, I implemented a small change whereby you can add in any quality and template metrics that have been computed to the sortingview window — this gets it one step closer to being like Phy :) happy to accommodate any suggestions. Thanks!

@zm711
Copy link
Collaborator

zm711 commented Aug 13, 2024

I think you hit the nail on the head with the lack of splitting. Splitting along the amplitude view isn't too bad in my opinion, but the big issue is that people often try to split along the PC views which are more problematic. They typically don't show all the spikes and may in fact be a poor representation of some data (especially as recordings get more and more channels). So deciding how to split in a reproducible more pipeline like structure isn't super clear. We have people that individually split out opto artifact waveforms using phy which I guess is one use, but again if they resorted their data and still had artifacts they would have to manually do everything again.

I'm wondering how do you specifically use the splitting in Phy? Do you try to do it on the PC? Do you try to confirm with the waveform view after? Do you only do it on the amplitudes?

@zm711 zm711 added the widgets Related to widgets module label Aug 13, 2024
@jonahpearl
Copy link
Contributor Author

Maybe we can move this to a discussion since it's not really related to the PR — but I normally only split if I see clear evidence in the waveform view of two units (e.g. clearly two sets of waveforms overlapping each other, like in the screenshot I posted in the sortingview issue) or in the amplitude view (e.g. two full bands of spikes with distinct amplitudes, not just a bit of drift). I have certainly used the PC view to then do those splits, but in those cases it's usually pretty clear how to split it. I've been a bit confused trying to track what happens to the split units in Phy so I haven't been able to verify after each one, but when I'm finished, overall the output looks ok, so I think it's working. I haven't ever gone through thinking, oh, those PCs look a little bimodal, maybe I'll split this one.

@alejoe91
Copy link
Member

@jonahpearl let me chime in here, since we discussed about this several times.

Sortingview works by pushing data to the cloud. To do so and make things efficient (and cheap), we have to minimize the amount of data used for visualization. As an example, the amplitude scatterplots use a decimated version of the amplitudes and of the spike times (e.g., 1 out of 10). In order to split, you need the full array of all the data you're plotting, because the "split" will need the indices of every spike that belong to each splitted cluster. Another example is that you don't have a Waveform view, but just a templates view!

So I think it could be an option to add, but in that case we should expect a clear slowdown in performance and increase in storage costs.

In addition, we recently added a curation format that we will need to extend for splits. I think we should do this anyways because we will implement splitting in the SpikeInterface-GUI, which works directly off the sorting analyzer.

@alejoe91
Copy link
Member

I moved my comment to the sortingview issue. The PR looks god @jonahpearl at a first sight. I'll review properly next week though :)

@alejoe91 alejoe91 added this to the 0.101.1 milestone Aug 27, 2024
@samuelgarcia
Copy link
Member

merci beaucoup.
This is cool.

@alejoe91 alejoe91 changed the title allow quality and template metrics in sortingview's unit table Allow quality and template metrics in sortingview's unit table Aug 28, 2024
@alejoe91
Copy link
Member

Tested and working great! Thanks again @jonahpearl

@alejoe91 alejoe91 merged commit 7b8f181 into SpikeInterface:main Aug 28, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
widgets Related to widgets module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants