-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kilosort3 not working for linear probes #338
Comments
I have the same issue of xcenter becoming blank because of the way xcoords are handled for a linear probe. I'm wondering if there is any update on this. |
hi @Jialiang-Lu Error in getMeWtW (line 30) Error in trackAndSort (line 100) Error in ksGUI/runSpikesort (line 792) Error in ksGUI/runAll (line 628) Error in ksGUI>@(,)obj.runAll() (line 319) Error while evaluating UIControl Callback. after trying your fix, the sorting was preformed with no errors |
Sorry about that, I pushed a fix now. Re-open this issue if you still have problems. |
It seems that Kilosort3 doesn't consider the situation of linear probes. Naturally, the xcoords in the channel map for a linear probe have the same value, which means that
rez.ops.dminx
will be 0.The line
Kilosort/clustering/template_learning.m
Line 34 in d8942c6
will make
xcenter
an empty array for linear probes and all following computation cannot be done.I replaced this line with
if dminx>0 xcenter = (min(rez.xc) + dminx-1):(2*dminx):(max(rez.xc)+dminx+1); else xcenter = rez.xc(1); end
and
Kilosort/clustering/template_learning.m
Line 55 in d8942c6
with
xchan = (abs(ycup - y0) < dmin) & (abs(xcup - x0) <= dminx);
Same for
Kilosort/clustering/final_clustering.m
Line 56 in d8942c6
and
Kilosort/clustering/final_clustering.m
Line 74 in d8942c6
I am not sure if this is the right fix but at least that works for my data collected by a linear probe.
The text was updated successfully, but these errors were encountered: