Skip to content

Commit

Permalink
Cleanup params, add installation and singularity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Mar 4, 2024
1 parent 6cf8701 commit 85293eb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 12 additions & 0 deletions doc/install_sorters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,18 @@ Kilosort3

* See also for Matlab/CUDA: https://www.mathworks.com/help/parallel-computing/gpu-support-by-release.html

Kilosort4
^^^^^^^^^

* Python, requires CUDA for GPU acceleration (highly recommended)
* Url: https://github.com/MouseLand/Kilosort
* Authors: Marius Pachitariu, Shashwat Sridhar, Carsen Stringer
* Installation::

pip install kilosort==4.0 torch

* For more installation instruction refer to https://github.com/MouseLand/Kilosort


pyKilosort
^^^^^^^^^^
Expand Down
8 changes: 2 additions & 6 deletions src/spikeinterface/sorters/external/kilosort4.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Kilosort4Sorter(BaseSorter):
requires_locations = True

_default_params = {
"n_chan_bin": 385,
"nblocks": 1,
"Th_universal": 9,
"Th_learned": 8,
Expand Down Expand Up @@ -53,7 +52,6 @@ class Kilosort4Sorter(BaseSorter):
}

_params_description = {
"batch_size": "Number of samples included in each batch of data. Default value: 60000.",
"nblocks": "Number of non-overlapping blocks for drift correction (additional nblocks-1 blocks are created in the overlaps). Default value: 1.",
"Th_universal": "Spike detection threshold for universal templates. Th(1) in previous versions of Kilosort. Default value: 9.",
"Th_learned": "Spike detection threshold for learned templates. Th(2) in previous versions of Kilosort. Default value: 8.",
Expand Down Expand Up @@ -95,11 +93,9 @@ class Kilosort4Sorter(BaseSorter):
For more information see https://github.com/MouseLand/Kilosort"""

installation_mesg = """\nTo use Kilosort4 run:\n
>>> git clone https://github.com/MouseLand/Kilosort
>>> cd Kilosort
>>> pip install .
>>> pip install kilosort==4.0
More information on Kilosort4 and its installation procedure at:
More information on Kilosort4 at:
https://github.com/MouseLand/Kilosort
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def test_kilosort3(run_kwargs):
print(sorting)


def test_kilosort4(run_kwargs):
clean_singularity_cache()
sorting = ss.run_sorter(sorter_name="kilosort4", output_folder="kilosort4", **run_kwargs)
print(sorting)


def test_pykilosort(run_kwargs):
clean_singularity_cache()
sorting = ss.run_sorter(sorter_name="pykilosort", output_folder="pykilosort", **run_kwargs)
Expand All @@ -72,4 +78,4 @@ def test_yass(run_kwargs):

if __name__ == "__main__":
kwargs = generate_run_kwargs()
test_pykilosort(kwargs)
test_kilosort4(kwargs)

0 comments on commit 85293eb

Please sign in to comment.