Closed davidioluigbo closed 2 years ago
Testing the code on the data you provided, it seems that the spike_train variable is empty, which led to an error in randi([1 0]), and because it was within a try/catch statement that part of the code was skipped and so st
was not defined, my current fix is to (1) remove the try/catch statement and (2) skip the plotting and warn the user if spike_train is empty (ref this commit: 6c83275325adcb49eda4bc568169c9dd517d2aa6) Let me know if this solved the problem!
Details: link to .csv used: https://1drv.ms/u/s!Ap8D0bWRL8h7gZhwnpwrWnE1YjcYTA?e=vzBMiY
.m file: https://1drv.ms/u/s!Ap8D0bWRL8h7lDTUSf6oz4DJiKMM?e=L4KM1j
Used axiontest.csv and Electrode progress bar fills up to 100% but outputs are not produced or saved. I changed high pass in pipeline to 6000 to process Axion Maestro MEA data (Params.fs = 12500 and Params.dSampF = 12500). Additionally, I used duration_s=round(spikeDetectionResult.params.duration) since spk_matrix = zeros(num_chan, duration_s*fs/dSampF) said I need integer inputs. Pipeline now reports the following error and produces the attached outputs:
Error in plotSpikeDetectionChecks (line 157) title({["Electrode "+channel], [(st-bin_ms25)/Params.dSampF + " - " + (st+bin_ms25)/Params.dSampF + " s"]}) Error in MEApipeline (line 222) plotSpikeDetectionChecks(spikeTimes,spikeDetectionResult,spikeWaveforms,Info,Params)
(https://user-images.githubusercontent.com/95871175/150539464-050b73cd-d3d8-442c-b9a1-1346fd9d0153.png)