Skip to content

Commit 22ad294

Browse files
authored
Merge branch 'main' into ruff-test
2 parents 760fc27 + b771821 commit 22ad294

File tree

247 files changed

+6859
-2640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+6859
-2640
lines changed

.github/scripts/test_kilosort4_ci.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ def test_cluster_spikes_arguments(self):
288288
self._check_arguments(cluster_spikes, expected_arguments)
289289

290290
def test_save_sorting_arguments(self):
291-
expected_arguments = ["ops", "results_dir", "st", "clu", "tF", "Wall", "imin", "tic0", "save_extra_vars"]
292-
293-
expected_arguments.append("save_preprocessed_copy")
291+
expected_arguments = [
292+
"ops", "results_dir", "st", "clu", "tF", "Wall", "imin", "tic0", "save_extra_vars", "save_preprocessed_copy"
293+
]
294+
if parse(kilosort.__version__) >= parse("4.0.39"):
295+
expected_arguments.append("skip_dat_path")
294296

295297
self._check_arguments(save_sorting, expected_arguments)
296298

.github/workflows/all-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
env:
1313
KACHERY_API_KEY: ${{ secrets.KACHERY_API_KEY }}
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1415

1516
concurrency: # Cancel previous workflows on the same pull request
1617
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/full-test-with-codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
KACHERY_API_KEY: ${{ secrets.KACHERY_API_KEY }}
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1011

1112
jobs:
1213
full-tests-with-codecov:

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: Set up Python 3.9
15+
- name: Set up Python
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.9'
18+
python-version: '3.12'
1919
- name: Install dependencies for testing
2020
run: |
2121
python -m pip install -U pip # Official recommended way

.github/workflows/test_kilosort4.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
paths:
99
- '**/kilosort4.py'
10+
- '**/test_kilosort4_ci.py'
1011

1112
jobs:
1213
versions:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer

doc/api.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ spikeinterface.core
55
-------------------
66
.. automodule:: spikeinterface.core
77

8-
.. autofunction:: load_extractor
8+
.. autofunction:: load
99
.. autoclass:: BaseRecording
1010
:members:
1111
.. autoclass:: BaseSorting
@@ -27,7 +27,7 @@ spikeinterface.core
2727
.. autoclass:: BinaryRecordingExtractor
2828
.. autoclass:: ZarrRecordingExtractor
2929
.. autoclass:: BinaryFolderRecording
30-
.. autoclass:: NpzFolderSorting
30+
.. autoclass:: NumpyFolderSorting
3131
.. autoclass:: NpyFolderSnippets
3232
.. autoclass:: NumpyRecording
3333
.. autoclass:: NumpySorting
@@ -76,7 +76,7 @@ Low-level
7676
.. autoclass:: ChunkRecordingExecutor
7777

7878

79-
Back-compatibility with ``WaveformExtractor`` (version < 0.101.0)
79+
Back-compatibility with ``WaveformExtractor`` (version > 0.100.0)
8080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8181

8282
.. automodule:: spikeinterface.core
@@ -105,6 +105,7 @@ NEO-based
105105
.. autofunction:: read_blackrock
106106
.. autofunction:: read_ced
107107
.. autofunction:: read_intan
108+
.. autofunction:: read_split_intan_files
108109
.. autofunction:: read_maxwell
109110
.. autofunction:: read_mearec
110111
.. autofunction:: read_mcsraw
@@ -168,6 +169,9 @@ spikeinterface.preprocessing
168169

169170
.. automodule:: spikeinterface.preprocessing
170171

172+
.. autofunction:: apply_preprocessing_pipeline
173+
.. autofunction:: get_preprocessing_dict_from_analyzer
174+
.. autofunction:: get_preprocessing_dict_from_file
171175
.. autofunction:: astype
172176
.. autofunction:: average_across_direction
173177
.. autofunction:: bandpass_filter
@@ -176,11 +180,16 @@ spikeinterface.preprocessing
176180
.. autofunction:: clip
177181
.. autofunction:: common_reference
178182
.. autofunction:: correct_lsb
183+
.. autofunction:: compute_motion
179184
.. autofunction:: correct_motion
180185
.. autofunction:: get_motion_presets
181186
.. autofunction:: get_motion_parameters_preset
187+
.. autofunction:: load_motion_info
188+
.. autofunction:: save_motion_info
182189
.. autofunction:: depth_order
183190
.. autofunction:: detect_bad_channels
191+
.. autofunction:: detect_and_interpolate_bad_channels
192+
.. autofunction:: detect_and_remove_bad_channels
184193
.. autofunction:: directional_derivative
185194
.. autofunction:: filter
186195
.. autofunction:: gaussian_filter
@@ -238,6 +247,7 @@ spikeinterface.sorters
238247

239248
.. autofunction:: available_sorters
240249
.. autofunction:: installed_sorters
250+
.. autofunction:: archived_sorters
241251
.. autofunction:: get_default_sorter_params
242252
.. autofunction:: get_sorter_params_description
243253
.. autofunction:: print_sorter_versions

doc/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
# -- Project information -----------------------------------------------------
5050

5151
project = 'SpikeInterface'
52-
copyright = '2022, Alessio Paolo Buccino, Samuel Garcia, Cole Hurwitz, Jeremy Magland, Matthias Hennig'
53-
author = 'Alessio Paolo Buccino, Samuel Garcia, Cole Hurwitz, Jeremy Magland, Matthias Hennig'
52+
copyright = '2022-2025, SpikeInterface Team'
53+
author = 'SpikeInterface Team'
5454

5555

5656
# -- General configuration ---------------------------------------------------
@@ -129,6 +129,7 @@
129129
'../examples/tutorials/qualitymetrics',
130130
'../examples/tutorials/comparison',
131131
'../examples/tutorials/widgets',
132+
'../examples/tutorials/forhowto',
132133
]),
133134
'within_subsection_order': FileNameSortKey,
134135
'ignore_pattern': '/generate_*',

doc/get_started/import.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ For example:
7373
.. code-block:: python
7474
7575
from spikeinterface.preprocessing import bandpass_filter, common_reference
76-
from spikeinterface.core import extract_waveforms
76+
from spikeinterface.core import create_sorting_analyzer
7777
from spikeinterface.extractors import read_binary
7878
7979
As mentioned this approach only imports exactly what you plan on using so it is the most minimalist. It does require

doc/get_started/install_sorters.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and in many cases the easiest way to run them is to do so via Docker or Singular
1212
**This is the approach we recommend for all users.**
1313
To run containerized sorters see our documentation here: :ref:`containerizedsorters`.
1414

15-
There are some cases where users will need to install the spike sorting algorithms in their own environment. If you
15+
There are some cases where you will need to install the spike sorting algorithms on your own computer. If you
1616
are on a system where it is infeasible to run Docker or Singularity containers, or if you are actively developing the
1717
spike sorting software, you will likely need to install each spike sorter yourself.
1818

@@ -24,7 +24,7 @@ opencl (Tridesclous) to use hardware acceleration (GPU).
2424
Here is a list of the implemented wrappers and some instructions to install them on your local machine.
2525
Installation instructions are given for an **Ubuntu** platform. Please check the documentation of the different spike
2626
sorters to retrieve installation instructions for other operating systems.
27-
We use **pip** to install packages, but **conda** should also work in many cases.
27+
We use **pip** to install packages, but **conda** or **uv** should also work in many cases.
2828

2929
Some novel spike sorting algorithms are implemented directly in SpikeInterface using the
3030
:py:mod:`spikeinterface.sortingcomponents` module. Checkout the :ref:`get_started/install_sorters:SpikeInterface-based spike sorters` section of this page
@@ -140,10 +140,12 @@ Kilosort4
140140

141141
* Python, requires CUDA for GPU acceleration (highly recommended)
142142
* Url: https://github.com/MouseLand/Kilosort
143-
* Authors: Marius Pachitariu, Shashwat Sridhar, Carsen Stringer
143+
* Authors: Marius Pachitariu, Shashwat Sridhar, Carsen Stringer, Jacob Pennington
144144
* Installation::
145145

146-
pip install kilosort==4.0 torch
146+
pip install kilosort
147+
pip uninstall torch
148+
pip install torch --index-url https://download.pytorch.org/whl/cu118
147149

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

@@ -240,7 +242,7 @@ Waveclus
240242
* Also supports Snippets (waveform cutouts) objects (:py:class:`~spikeinterface.core.BaseSnippets`)
241243
* Url: https://github.com/csn-le/wave_clus/wiki
242244
* Authors: Fernando Chaure, Hernan Rey and Rodrigo Quian Quiroga
243-
* Installation needs Matlab::
245+
* Installation requires Matlab::
244246

245247
git clone https://github.com/csn-le/wave_clus/
246248
# provide installation path by setting the WAVECLUS_PATH environment variable
@@ -270,7 +272,7 @@ with SpikeInterface.
270272
SpykingCircus2
271273
^^^^^^^^^^^^^^
272274

273-
This is a upgraded version of SpykingCircus, natively written in SpikeInterface.
275+
This is an upgraded version of SpykingCircus, natively written in SpikeInterface.
274276
The main differences are located in the clustering (now using on-the-fly features and less prone to finding
275277
noise clusters), and in the template-matching procedure, which is now a fully orthogonal matching pursuit,
276278
working not only at peak times but at all times, recovering more spikes close to noise thresholds.
@@ -289,7 +291,7 @@ Tridesclous2
289291
^^^^^^^^^^^^
290292

291293
This is an upgraded version of Tridesclous, natively written in SpikeInterface.
292-
#Same add his notes.
294+
293295

294296
* Python
295297
* Requires: HDBSCAN and Numba
@@ -314,7 +316,7 @@ Klusta (LEGACY)
314316
* Authors: Cyrille Rossant, Shabnam Kadir, Dan Goodman, Max Hunter, Kenneth Harris
315317
* Installation::
316318

317-
pip install Cython h5py tqdm
319+
pip install cython h5py tqdm
318320
pip install click klusta klustakwik2
319321

320322
* See also: https://github.com/kwikteam/phy

0 commit comments

Comments
 (0)