Open nikhilchandra opened 22 hours ago
@alejoe91 can you look at this !,
@nikhilchandra can you try to check I'd this is the issue by saving a squeezed version of the amplitudes?
I'm also super behind on tweaking phy so if you installed phy recently we may have other problems. It's hard to fix the export function until I get phy a bit more stable for recent updates, but I really have no time for it right now.
@alejoe91 My apologies, I was mistaken.
KS4's direct output --> amplitudes.npy --> amplitudes.shape = (4803961,) Phy export --> amplitudes.npy --> amplitudes.shape = (4803947, 1)
So it's misshapen and has the wrong number of elements.
That's weird because I always remember the old kilosort returning things with the extra dimension so Phy should account for this. If I have a few moments I can check one of my old phy/ks 2 or 3 files to see what shape they have. I'm just running something on my computer right now so can't check.
As far as number of spikes, we often see that there are spikes occurring before/after the actual recording time which we filter out. If you look at the Phy terminal output it also mentions there being unclustered spikes (which I think could be related). so the decreased number is likely due to our stricter cutoffs for what to include in the data--although I could be wrong since other users note outright errors if they don't run remove_excess_spikes in some phy data. So happy to hear other's opinions on this.
I used SpikeInterface to run KS4 on a dataset and followed this with si.export_to_phy. I next tried to open the exported dataset in phy with this command:
phy template-gui params.py
But this gave me the following error:
I used numpy to load amplitudes.npy as output directly by KS4 and also as output by si.export_to_phy. The direct KS4 version has shape (4803961,) while the si.export_to_phy version has shape (4803961,1). Could this mean there is a bug in SpikeInterface's implementation of export_to_phy?
Thanks.
tagging @cheydrick