From cad2423314265e3a1b3b3f0a23772074bf7f2a1c Mon Sep 17 00:00:00 2001 From: Samuel Garcia Date: Tue, 16 Jul 2024 07:14:42 +0200 Subject: [PATCH 1/4] After release. --- pyproject.toml | 18 +++++++++--------- src/spikeinterface/__init__.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d4a83bb7fe..fed46f5d8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spikeinterface" -version = "0.101.0rc1" +version = "0.101.0" authors = [ { name="Alessio Buccino", email="alessiop.buccino@gmail.com" }, { name="Samuel Garcia", email="sam.garcia.die@gmail.com" }, @@ -125,16 +125,16 @@ test_core = [ # for github test : probeinterface and neo from master # for release we need pypi, so this need to be commented - # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", - # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", + "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", + "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", ] test_extractors = [ # Functions to download data in neo test suite "pooch>=1.8.2", "datalad>=1.0.2", - # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", - # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", + "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", + "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", ] test_preprocessing = [ @@ -174,8 +174,8 @@ test = [ # for github test : probeinterface and neo from master # for release we need pypi, so this need to be commented - # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", - # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", + "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", + "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", ] docs = [ @@ -198,8 +198,8 @@ docs = [ "datalad>=1.0.2", # for release we need pypi, so this needs to be commented - # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", # We always build from the latest version - # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", # We always build from the latest version + "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", # We always build from the latest version + "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", # We always build from the latest version ] diff --git a/src/spikeinterface/__init__.py b/src/spikeinterface/__init__.py index 97fb95b623..306c12d516 100644 --- a/src/spikeinterface/__init__.py +++ b/src/spikeinterface/__init__.py @@ -30,5 +30,5 @@ # This flag must be set to False for release # This avoids using versioning that contains ".dev0" (and this is a better choice) # This is mainly useful when using run_sorter in a container and spikeinterface install -# DEV_MODE = True -DEV_MODE = False +DEV_MODE = True +# DEV_MODE = False From 6cc8a0a8220d63f05b0e5e49fb8947a256f31cc8 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 19 Jul 2024 13:12:29 +0200 Subject: [PATCH 2/4] Add missing PRs, update pyproject --- doc/releases/0.101.0.rst | 10 ++++++++-- pyproject.toml | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/releases/0.101.0.rst b/doc/releases/0.101.0.rst index 93519be71b..c34cd0dc8e 100644 --- a/doc/releases/0.101.0.rst +++ b/doc/releases/0.101.0.rst @@ -8,7 +8,7 @@ Estimated: 19th July 2024 Main changes: * Implementation of `SortingAnalyzer` (#2398) -* Improved auto-merging functions and enable `SortingAnalyzer` to merge units and extensions (#3043, #3154, #3203) +* Improved auto-merging functions and enable `SortingAnalyzer` to merge units and extensions (#3043, #3154, #3203, #3208) * Added framework for hybrid recording generation (#2436, #2769, #2857) * Refactored motion correction with the `Motion` class and the DREDGE AP and LFP methods (#2915, #3062) * Extendeded benchmarking of `sortingcomponents` (#2501, #2518, #2586, #2811, #2959) @@ -16,6 +16,7 @@ Main changes: core: +* Implement a simple system to have backward compatibility for Analyzer extension (#3215) * Units aggregation preserve unit ids of aggregated sorters (#3180) * Better error message for `BaseExtractor.load()` (#3170) * Saving provenance with paths relative to folder (#3165) @@ -98,6 +99,7 @@ core: preprocessing: +* Update doc handle drift + better preset (#3232) * Remove name class attribute in preprocessing module (#3200) * Add option to use ref_channel_ids in global common reference (#3139) * Adding option to overwrite while doing correct_motion and saving to a folder (#3088) @@ -150,6 +152,7 @@ extractors: sorters: +* Patch for SC2 after release AND bugs in auto merge (#3213) * Improve error log to json in run_sorter (#3057) * Add support for kilosort>=4.0.12 (#3055) * Make sure we check `is_filtered()` rather than bound method during run basesorter (#3037) @@ -179,7 +182,7 @@ sorters: postprocessing: -* Fix pca transform error (#3178) +* Fix pca transform error (#3178, #3224) * Fix `spike_vector_to_indices()` (#3048) * Remove un-used argument (#3021) * Optimize numba cross-correlation and extend `correlograms.py` docstrings and tests (#3017) @@ -199,6 +202,7 @@ qualitymetrics: curation: +* Add `apply_curation()` (#3208) * Port auto-merge changes and refactor (#3203) * Implement `apply_merges_to_sorting()` (#3154) * Proposal of format to hold the manual curation information (#2933) @@ -249,6 +253,7 @@ generation: sortingcomponents: +* Fix estimate_motion when time_vector is set (#3218) * Fix select peaks (#3132) * Dredge lfp and dredge ap (#3062) * Use "available" for memory caching (#3008) @@ -269,6 +274,7 @@ sortingcomponents: documentation: +* Analyzer docstring cleanup (#3220) * Eradicate sphinx warnings (#3188) * Convert doc references from `wf_extractor` -> `sorting_analyzer` (#3185) * Add explainer of compute always computing in the analyzer (vs WaveformExtractor behavior) documentation (#3173) diff --git a/pyproject.toml b/pyproject.toml index d4a83bb7fe..54afc98fdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spikeinterface" -version = "0.101.0rc1" +version = "0.101.0" authors = [ { name="Alessio Buccino", email="alessiop.buccino@gmail.com" }, { name="Samuel Garcia", email="sam.garcia.die@gmail.com" }, @@ -25,7 +25,7 @@ dependencies = [ "tqdm", "zarr>=2.16,<2.18", "neo>=0.13.0", - "probeinterface>=0.2.22", + "probeinterface>=0.2.23", "packaging", ] From ad2f656ce63193ae739c2a43d8fd6f11be36865d Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 19 Jul 2024 13:14:20 +0200 Subject: [PATCH 3/4] DEV_MODE and git installs --- pyproject.toml | 16 ++++++++-------- src/spikeinterface/__init__.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5b58724e52..54afc98fdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,16 +125,16 @@ test_core = [ # for github test : probeinterface and neo from master # for release we need pypi, so this need to be commented - "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", - "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", + # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", + # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", ] test_extractors = [ # Functions to download data in neo test suite "pooch>=1.8.2", "datalad>=1.0.2", - "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", - "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", + # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", + # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", ] test_preprocessing = [ @@ -174,8 +174,8 @@ test = [ # for github test : probeinterface and neo from master # for release we need pypi, so this need to be commented - "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", - "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", + # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", + # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", ] docs = [ @@ -198,8 +198,8 @@ docs = [ "datalad>=1.0.2", # for release we need pypi, so this needs to be commented - "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", # We always build from the latest version - "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", # We always build from the latest version + # "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", # We always build from the latest version + # "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", # We always build from the latest version ] diff --git a/src/spikeinterface/__init__.py b/src/spikeinterface/__init__.py index 306c12d516..97fb95b623 100644 --- a/src/spikeinterface/__init__.py +++ b/src/spikeinterface/__init__.py @@ -30,5 +30,5 @@ # This flag must be set to False for release # This avoids using versioning that contains ".dev0" (and this is a better choice) # This is mainly useful when using run_sorter in a container and spikeinterface install -DEV_MODE = True -# DEV_MODE = False +# DEV_MODE = True +DEV_MODE = False From a38116d6331a286e0f224af28be0298182b6cb4b Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 19 Jul 2024 16:46:07 +0200 Subject: [PATCH 4/4] Some final docs/api/sphinx fixes --- doc/api.rst | 1 + doc/how_to/drift_with_lfp.rst | 1 + doc/index.rst | 4 ++-- doc/modules/postprocessing.rst | 4 ++-- src/spikeinterface/core/generate.py | 4 ++-- src/spikeinterface/curation/__init__.py | 2 +- .../sortingcomponents/motion/dredge.py | 12 ++++++------ .../sortingcomponents/motion/motion_cleaner.py | 4 ++-- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index afc3e38ab2..1966b48a37 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -336,6 +336,7 @@ spikeinterface.curation Deprecated ~~~~~~~~~~ .. automodule:: spikeinterface.curation + :noindex: .. autofunction:: apply_sortingview_curation .. autoclass:: CurationSorting diff --git a/doc/how_to/drift_with_lfp.rst b/doc/how_to/drift_with_lfp.rst index 0decc1058a..aa79c9e97b 100644 --- a/doc/how_to/drift_with_lfp.rst +++ b/doc/how_to/drift_with_lfp.rst @@ -64,6 +64,7 @@ Preprocessing Contrary to the **dredge_ap** approach, which needs detected peaks and peak locations, the **dredge_lfp** method is estimating the motion directly on traces. Importantly, the method requires some additional pre-processing steps: + * ``bandpass_filter``: to "focus" the signal on a particular band * ``phase_shift``: to compensate for the sampling misalignement * ``resample``: to further reduce the sampling fequency of the signal and speed up the computation. The sampling frequency of the estimated motion will be the same as the resampling frequency. Here we choose 250Hz, which corresponds to a sampling interval of 4ms. diff --git a/doc/index.rst b/doc/index.rst index c416764d38..ed443e4200 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,12 +14,12 @@ state-of-the-art spike sorters, post-process and curate the output, compute qual .. warning:: - Version 0.101.0 introduces a major API improvement: the :code:`SortingAnalyzer`.` + Version 0.101.0 introduces a major API improvement: the :code:`SortingAnalyzer`. To read more about the motivations, checkout the `enhancement proposal `_. Learn how to :ref:`update your code here ` and read more about the :code:`SortingAnalyzer`, please refer to the - :ref:`core ` and :ref:`postprocessing ` module + :ref:`core ` and :ref:`postprocessing ` module documentation. diff --git a/doc/modules/postprocessing.rst b/doc/modules/postprocessing.rst index ffb55d2929..cc2b064ed0 100644 --- a/doc/modules/postprocessing.rst +++ b/doc/modules/postprocessing.rst @@ -13,12 +13,12 @@ Extensions as AnalyzerExtensions -------------------------------- There are several postprocessing tools available, and all of them are implemented as a -:py:class:`~spikeinterface.core.ResultExtension`. If the :code:`SortingAnalyzer` is saved to disk, all computations on +:py:class:`~spikeinterface.core.AnalyzerExtension`. If the :code:`SortingAnalyzer` is saved to disk, all computations on top of it will be saved alongside the :code:`SortingAnalyzer` itself (sub folder, zarr path or sub dict). This workflow is convenient for retrieval of time-consuming computations (such as pca or spike amplitudes) when reloading a :code:`SortingAnalyzer`. -:py:class:`~spikeinterface.core.ResultExtension` objects are tightly connected to the +:py:class:`~spikeinterface.core.AnalyzerExtension` objects are tightly connected to the parent :code:`SortingAnalyzer` object, so that operations done on the :code:`SortingAnalyzer`, such as saving, loading, or selecting units, will be automatically applied to all extensions. diff --git a/src/spikeinterface/core/generate.py b/src/spikeinterface/core/generate.py index 62aa7f37c3..ff75789aab 100644 --- a/src/spikeinterface/core/generate.py +++ b/src/spikeinterface/core/generate.py @@ -1079,8 +1079,8 @@ class NoiseGeneratorRecording(BaseRecording): noise_block_size: int Size in sample of noise block. - Note - ---- + Notes + ----- If modifying this function, ensure that only one call to malloc is made per call get_traces to maintain the optimized memory profile. """ diff --git a/src/spikeinterface/curation/__init__.py b/src/spikeinterface/curation/__init__.py index add08ddb5e..657b936fb9 100644 --- a/src/spikeinterface/curation/__init__.py +++ b/src/spikeinterface/curation/__init__.py @@ -12,6 +12,6 @@ from .splitunitsorting import SplitUnitSorting, split_unit_sorting # curation format -from .curation_format import validate_curation_dict, curation_label_to_dataframe +from .curation_format import validate_curation_dict, curation_label_to_dataframe, apply_curation from .sortingview_curation import apply_sortingview_curation diff --git a/src/spikeinterface/sortingcomponents/motion/dredge.py b/src/spikeinterface/sortingcomponents/motion/dredge.py index 6cc3a8d8d0..ded4c257ab 100644 --- a/src/spikeinterface/sortingcomponents/motion/dredge.py +++ b/src/spikeinterface/sortingcomponents/motion/dredge.py @@ -182,8 +182,8 @@ def dredge_ap( matrix (or several, one for each nonrigid window). This matrix is used to solve for a motion estimate. - Arguments - --------- + Parameters + ---------- recording: BaseRecording The recording extractor peaks: numpy array @@ -518,8 +518,8 @@ def dredge_online_lfp( ): """Online registration of a preprocessed LFP recording - Arguments - --------- + Parameters + ---------- {} Returns @@ -1065,8 +1065,8 @@ def calc_corr_decent_pair( the normxcorrs at the best displacement, and the matrix of the best displacements. - Arguments - --------- + Parameters + ---------- raster : DxT array batch_size : int How many raster rows to xcorr against the whole raster diff --git a/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py b/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py index 6fe36a6193..2fc1a281a9 100644 --- a/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py +++ b/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py @@ -9,8 +9,8 @@ def clean_motion_vector(motion, temporal_bins, bin_duration_s, speed_threshold=3 Also can apply a smoothing. - Arguments - --------- + Parameters + ---------- motion: numpy array 2d Motion estimate in um. temporal_bins: numpy.array 1d