MouseLand / Kilosort

Fast spike sorting with drift correction
https://kilosort.readthedocs.io/en/latest/
GNU General Public License v3.0
478 stars 248 forks source link

BUG: Error based on probe settings #627

Closed MFalappa closed 7 months ago

MFalappa commented 7 months ago

Describe the issue:

Hello, I am an engineer at Corticale. I tried using Kilosort on some of our datasets, leaving the default parameters. The probe I analyzed has 8 shanks for a total of 1024 channels, and the recording is 300 seconds long. Entering the data as it is, the computation time is 13 hours and it returns the error reported. However, if I organize the probe as if it were a single 1024-channel needle (2 columns with 512 rows), the computation time is reduced to about 1 and a half hours, and the sorting is successful. Do you have any idea what it could be?

Reproduce the bug:

No response

Error message:

Traceback (most recent call last):
  File "C:\Users\matteo.falappa\AppData\Roaming\Python\Python311\site-packages\kilosort\run_kilosort.py", line 401, in detect_spikes
    clu, Wall = clustering_qr.run(ops, st0, tF, mode='spikes', device=device,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\matteo.falappa\AppData\Roaming\Python\Python311\site-packages\kilosort\clustering_qr.py", line 317, in run
    raise ValueError(
ValueError: `get_data_cpu` never found suitable channels in `clustering_qr.run`.
dmin, dminx, and xcenter are: (30.0, 30.0, 1975.0)

Version information:

Python 3.11.7, kilosort 4, pypi 4.0.2

Context for the issue:

No response

Experiment information:

8 shanks, each of them with in 2 columns and 64 rows, inter shank space 300 um

jacobpennington commented 7 months ago

Hello, This is a known issue due to the fact that we don't currently handle shanks separately, and your solution of stacking them on top of each other is exactly what we've been suggesting as a temporary workaround. We're working on updating the code to avoid needing to do this.