MouseLand / Kilosort

Fast spike sorting with drift correction for up to a thousand channels
https://kilosort.readthedocs.io/en/latest/
GNU General Public License v3.0
469 stars 245 forks source link

D128 Probe Channel Map #347

Closed saman-abbaspoor closed 8 months ago

saman-abbaspoor commented 3 years ago

Hi everyone,

I am recording with a 128 channel probe using OpenEphys data acquisition system. Below is a MATLAB code that shows how I'm trying to create my channel map. When I don't include bad channels, spike sorting runs but I get a weird drift estimation. When I include the bad channels, I get the following error. I added an excel sheet that shows the specifications of the probe. Yellow labeled channels are bad ones. I would appreciate if you can tell me what I'm doing wrong and help me create the correct ChanMap.

chanMap = [65,64,66,63,67,62,68,61,69,60,70,59,71,58,72,57,73,56,74,55,75,54,76,53,...
    77,52,78,51,79,50,80,49,81,48,82,47,83,46,84,45,85,44,86,43,87,42,88,41,89,40,90,...
    39,91,38,92,37,93,36,94,35,95,34,96,33,97,32,98,31,99,30,100,29,101,28,102,27,103,...
    26,104,25,105,24,106,23,107,22,108,21,109,20,110,19,111,18,112,17,113,16,114,15,115,...
    14,116,13,117,12,118,11,119,10,120,9,121,8,122,7,123,6,124,5,125,4,126,3,127,2,128,1]

chanMap0ind = chanMap - 1;

Bad_Channels = [1 3 5 7 9 11 13 32 47 48 49 51 65 66 67 69 71 73 81 83 85 87 89 91 93 99 111];

connected = true(128, 1); connected(Bad_Channels) = 0;

xcoords = 15 * repmat([1 0], 1, 64); xcoords(Bad_Channels) = NaN;
ycoords = -15 * [1:128]; ycoords(Bad_Channels) = NaN;

kcoords = ones(1, 128); kcoords(Bad_Channels) = NaN;

fs = 30000; 

save(fullfile(fpath, 'chanMap.mat'), 'chanMap', 'connected', 'xcoords', 'ycoords', 'kcoords', 'chanMap0ind', 'fs')

The specifications of the probe

D128-1-map.xlsx

image (2)

ChanMap ErrorChanMap
marius10p commented 3 years ago

This looks like a GUI error. Can you run Kilosort from the script to see if you still get the error?

Do your bad channels have large signals with high-frequency content that could disrupt the drift correction? Where there sufficient spikes found during the initial spike detection phase before drift correction?