Kilosort
Kilosort copied to clipboard
Error using matlab.internal.math.interp1 and Error using gpuArray/subsref
I'm using Kilosort for NeuroNexus 32 channel linear probes, and I'm getting this error during pre-processing:
Error using matlab.internal.math.interp1 Sample points must be unique and sorted in ascending order.
Error in interp1 (line 188) VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
Error in shift_batch_on_disk2 (line 14) shifts = interp1(ysamp, shifts, rez.yc, 'makima', 'extrap');
Error in datashift2 (line 149) dprev = shift_batch_on_disk2(rez, ibatch, dshift(ibatch, :), yblk, sig, dprev);
Error in ksGUI/runPreproc (line 732) obj.rez = datashift2(obj.rez, 1);
Error in ksGUI>@(~,~)obj.runPreproc() (line 333) 'Callback', @(~,~)obj.runPreproc());
Error while evaluating UIControl Callback.
When I work around this error, I get another error during spike sorting:
Error using gpuArray/subsref Subscript indices must either be real positive integers or logicals.
Error in extractTemplatesfromSnippets (line 56) wTEMP = dd(:, round(linspace(1, size(dd,2), nPCs)));
Error in extract_spikes (line 42) [wTEMP, wPCA] = extractTemplatesfromSnippets(rez, NrankPC);
Error in ksGUI/runSpikesort (line 795) [obj.rez, st3, tF] = extract_spikes(obj.rez);
Error in ksGUI>@(~,~)obj.runSpikesort() (line 339) 'Callback', @(~,~)obj.runSpikesort());
Error while evaluating UIControl Callback.
What are your channel map positions, ycoord and xcoord?
Nchannels = 32;
chanMap = 1:Nchannels;
xcoords = ones(Nchannels,1);
ycoords = (1:Nchannels)';
On Sat, May 1, 2021 at 7:30 AM Marius Pachitariu @.***> wrote:
What are your channel map positions, ycoord and xcoord?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MouseLand/Kilosort/issues/390#issuecomment-830625220, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALK2BXFHSWCMW4CS2H5HLTLTLPX7BANCNFSM432OWVFQ .
I am having an identical issue!, and same mapping settings
Same issue. It would be nice to get some assistance on this problem. @marius10p
I'm having the same issue. What appears to be happening is that there is initially data in temp_wh.dat after preprocessDataSub
; however, after running datashift2
, in the function shift_batch_on_disk
, temp_wh gets overwritten by all zeros.
I have data sets from tetrodes/hextrodes in different structures and therefore variable numbers of channels per kilosort run. Data sets with 16, 18 and 24 channels worked fine, but the issue came up in a data set with 12 channels.
Additionally, if I run datashift2 with do_correction set to false
the sort completes successfully
Same error. ysamp has one repeating value and is therefor not unique.
Same error with a unique tetrode in a square array. x = [0 25 0 25] y = [0 0 25 25] When trying to rotate in this way for the y axis to be in acendent order this way: x = 0 21.6500000000000 -12.5000000000000 9.15000000000000 y = 0 12.5000000000000 21.6500000000000 34.1500000000000 i get a different error:
Error using matlab.internal.math.interp1 The sample points must be finite.
because the function align_block2 returns NaN
Same issue data from a 16 channel linear probe NeuroNexus. Converted data to .bin file contains 16 channels
xcoords = zeros(16, 1) ycoords =[250,350,150,550,450,50,650,750,800,700,100,500,600,200,400,300] 16x1
Value of ysamp during error generation: in datashift2| ysamp= [2.5000 7.5000 12.5000 17.5000 22.5000] in shift_batch_on_disk2| ysamp= = [2.5, 7.5, 7.5, 12.5, 12.5, 17.5, 17.5, 22.5, 22.5]
With this ysamp interp1 is called which causes the error.
Any help from the team would be greatly appreciated