spikeinterface
spikeinterface copied to clipboard
Improve documentation for excess spikes error in `FrameSliceSorting`.
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...
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?
Yeah it must be a problem with the sorter!
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.