cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
318 stars 157 forks source link

channel_map.npy error #1095

Closed brendanito closed 3 years ago

brendanito commented 3 years ago

Hi all,

I'm recording with a 2-shank 64-channel Cambridge Neurotech probe, and using Phy2 with Kilosort3 for sorting. Kilosort loads my channel map .mat file, and the display of the channels and shanks appear correctly on the Kilosort GUI. However, when I open Kilosort3's output with Phy, all of the clusters in ClusterView are labelled as coming from the same shank, and the channels are not in the correct order in TraceView.

phyClusterView

I checked the 'channel_map.npy' file output by Kilosort - the channels are not in the correct order. I changed the channels to the correct order, and saved to 'channel_map.npy'; however, now when I try to open Phy, I get an assertion error.

phyAssertionError

If I change my 'channel_map.npy' file back to the incorrect order of the channels, I can open Phy, but the channel map is still wrong.

Anyone face similar issues and have a work-around? This appears to be partly a Kilosort issue, as I haven't seen this channel map issue with Kilosort2. However, I'm not sure why changing the 'channel_map.npy' file would throw an error if that was only the case, unless I'm missing something here.