spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

Improve documentation for excess spikes error in `FrameSliceSorting`.

Open h-mayorquin opened this issue 11 months ago • 2 comments

From the discussion here: https://github.com/SpikeInterface/spikeinterface/issues/2573#issuecomment-1995993813

I was kind of recluctanct to add "could indicate a bug on the sorter" as this is a very general function but I guess a sorting object can only come from sorter so...

h-mayorquin avatar Mar 19 '24 23:03 h-mayorquin

I think you're right to be a little wary. The only thing I could think of is maybe a rounding error. Like if the sampling_rate is 30k, but because we store it as a float it ends up being 30_000.000002434 and so when we multiply that by the real big sample numbers it leads to some error in certain sorters. But I guess we would have to track down these failures and see if they are within a few samples of the end of the recording or if they seem to have random times. Other than a rounding error everything else would point to an issue with the sorter, no?

zm711 avatar Mar 20 '24 00:03 zm711

Yeah it must be a problem with the sorter!

alejoe91 avatar Mar 20 '24 09:03 alejoe91

Maybe you guys have a better sense, but does this excessive spikes only occur for Kilosort and do you think it could be due to the fact that Kilosort can add padding to the recording? So maybe it is accidentally returning a padded frame (for whatever reason) which would then be after the recording since the recording doesn't have that padding? --That's still a problem at the sorter level, but like @h-mayorquin, I'm just curious what the root cause is.

zm711 avatar Mar 25 '24 18:03 zm711