From e8a6974d51151f809085dfb8f0919f426db33f36 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Wed, 31 Jan 2024 14:30:53 +0100 Subject: [PATCH 1/9] (wip) prepare release 0.100.0 --- README.md | 3 ++ doc/releases/0.100.0.rst | 102 +++++++++++++++++++++++++++++++++++++++ doc/whatisnew.rst | 7 +++ pyproject.toml | 16 +++--- 4 files changed, 120 insertions(+), 8 deletions(-) create mode 100644 doc/releases/0.100.0.rst diff --git a/README.md b/README.md index 977cf6eba4..b0f449d7f9 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ [![Twitter](https://img.shields.io/badge/@spikeinterface-%231DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white)](https://twitter.com/spikeinterface) [![Mastodon](https://img.shields.io/badge/-@spikeinterface-%232B90D9?style=for-the-badge&logo=mastodon&logoColor=white)](https://fosstodon.org/@spikeinterface) +> :warning::warning::warning: **PRs with new features are frozen!**: after the 0.100.0 release, we will not accept PRs with new features (only bug fixes) until February 20th 2024 + + SpikeInterface is a Python framework designed to unify preexisting spike sorting technologies into a single code base. Please [Star](https://github.com/SpikeInterface/spikeinterface/stargazers) the project to support us and [Watch](https://github.com/SpikeInterface/spikeinterface/subscription) to always stay up-to-date! diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst new file mode 100644 index 0000000000..38cd05ac60 --- /dev/null +++ b/doc/releases/0.100.0.rst @@ -0,0 +1,102 @@ +.. _release0.100.0: + +SpikeInterface 0.100.0 release notes +------------------------------------ + +2nd February 2024 + +Main changes: + +* Windows +* NWB +* joblib + + + +core: + +* Add `Template`` class (#1982) +* Use python methods instead of parsing and eleminate try-except in to_dict +(#2157) +* `WaveformExtractor.is_extension` --> `has_extension` (#2158) +* Speed improvement to `get_empty_units()`` (#2173) +* Allow precomputing spike trains (#2175) +* Add 'percentile' to template modes and `plot_unit_templates` (#2179) +* Add `rename_units` method in sorting (#2207) +* Add an option for count_num_spikes_per_unit (#2209) +* Remove joblib in favor of `ParallelProcessExecutor` (#2218) +* Fixed a bug when caching recording noise levels (#2220) +* Various fixes for Windows (#2221) +* Fix num_samples in concatenation (#2223) +* Disable writing templates modes npy in read-only mode (#2251) +* Assert renamed_channels/unit_ids is unique (#2252) +* Implement save_to_zarr for BaseSorting (#2254) +* Improve the BaseExtractor.to_dict() relative_to machanism to make it safer on Windows (#2279) +* Make sure sampling frequency is always float (#2283) +* `NumpySorting.from_peaks`: make `unit_ids` mandatory (#2315) +* Make chunksize in `get_random_data_chunks` throw warning and clip if under limit (#2321) +* ids can be a tuple in `ids_to_indices` (#2324) +* `get_num_frames` to return a python int (#2326) +* Add an auto adjustment if n_jobs too high on Windows (#2329) +* Cache spike_vector from parent (#2353) +* Refactor recording tools (#2363) +* Add rename_channels method to recording extractors (#2364) +* Create `SharedmemRecording` (#2365) +* `WaveformExtractor.select_units` also functional if `we.has_recording()=False` (#2368) +* Add zarrrecordingextractor.py for backward compatibility (#2377, #2395, #2451) +* Improve ZarrSortingExtractor (#2403) +* Improvement to compute sparsity without WaveformsExtractor (#2410) + +extractors: + +preprocessing: + + + +sorters: + + +postprocessing: + +* Use sampling_frequency instead of get_sampling_frequency in _make_bins (#2284) +* Multi-channel template metrics fix (#2323) +* Fix bug in get_repolarization_slope with wrong index type (#2432) + +qualitymetrics: + +* Implemented sd_ratio as quality metric (#2146, #2402) +* Avoid duplicated template and quality metric names (#2210) +* Fix rp_violations when specifying unit_ids (#2247) + +curation: + +* Fix bug in `mergeunits` (#2443) + +* Fix sortingview curation and merge units with array properties (#2427) + +widgets: + +* Sorting summary updates in sortingview (#2318) +* Add a more robust `delta_x` to unit_waveforms (#2287) +* Prevent users from providing a `time_range` after the ending of the segment in `plot_traces` (#2286) +* Fix sortingview checks for NaN if strings (#2243) + +generation: + +* Creation of a TransformSorting object to track modifications and bencharmk (#1999) +* Add a minimum distance in generate_unit_locations (#2147) +* Add Poisson statistics to generate_sorting and optimize memory profile (#2226) +* Fix add_shift_shuffle section in synthesize_random_firings (#2334) + +sortingcomponents: + +* Strict inegality for sparsity with radius_um (#2277) by yger was merged on Dec 1, 2023 + +* Fix memory leak in lsmr solver and optimize correct_motion (#2263) + +docs: + +ci / packaging / tests: + +* Add tests for unique names in channel slice and unit selection (#2258) +* Add from `__future__` import annotations to core files (#2340) diff --git a/doc/whatisnew.rst b/doc/whatisnew.rst index 2232173e5a..c84885ef1b 100644 --- a/doc/whatisnew.rst +++ b/doc/whatisnew.rst @@ -8,6 +8,7 @@ Release notes .. toctree:: :maxdepth: 1 + releases/0.100.0.rst releases/0.99.1.rst releases/0.99.0.rst releases/0.98.2.rst @@ -33,6 +34,12 @@ Release notes releases/0.9.1.rst +Version 0.100.0 +=============== + +* TODO + + Version 0.99.1 ============== diff --git a/pyproject.toml b/pyproject.toml index df618cc0d1..e894f2f818 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spikeinterface" -version = "0.100.0.dev0" +version = "0.100.0" authors = [ { name="Alessio Buccino", email="alessiop.buccino@gmail.com" }, { name="Samuel Garcia", email="sam.garcia.die@gmail.com" }, @@ -23,9 +23,9 @@ dependencies = [ "numpy", "threadpoolctl>=3.0.0", "tqdm", - "zarr", - "neo>=0.12.0", - "probeinterface>=0.2.19", + "zarr>=0.2.16", + "neo>=0.13.0", + "probeinterface>=0.2.21", ] [build-system] @@ -144,8 +144,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 = [ @@ -162,8 +162,8 @@ docs = [ "hdbscan>=0.8.33", # For sorters spykingcircus2 + tridesclous "numba", # For many postprocessing functions # 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 ] From dae157a7d73eef135b8067f0db2fd0cb3ac27ce5 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Wed, 31 Jan 2024 17:22:52 +0100 Subject: [PATCH 2/9] Filled in release notes --- README.md | 2 +- doc/releases/0.100.0.rst | 51 +++++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b0f449d7f9..98d43ab3d0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ [![Twitter](https://img.shields.io/badge/@spikeinterface-%231DA1F2.svg?style=for-the-badge&logo=Twitter&logoColor=white)](https://twitter.com/spikeinterface) [![Mastodon](https://img.shields.io/badge/-@spikeinterface-%232B90D9?style=for-the-badge&logo=mastodon&logoColor=white)](https://fosstodon.org/@spikeinterface) -> :warning::warning::warning: **PRs with new features are frozen!**: after the 0.100.0 release, we will not accept PRs with new features (only bug fixes) until February 20th 2024 +> :warning::warning::warning: **PRs with new features are frozen!**: after the 0.100.0 release, we will not accept PRs with new features (only bug fixes) until February 21st 2024. SpikeInterface is a Python framework designed to unify preexisting spike sorting technologies into a single code base. diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index 38cd05ac60..a5ef272280 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -10,7 +10,7 @@ Main changes: * Windows * NWB * joblib - +* `run_sorter` in container: add several options for installing spikeinterface (#2273) core: @@ -44,17 +44,48 @@ core: * Create `SharedmemRecording` (#2365) * `WaveformExtractor.select_units` also functional if `we.has_recording()=False` (#2368) * Add zarrrecordingextractor.py for backward compatibility (#2377, #2395, #2451) -* Improve ZarrSortingExtractor (#2403) -* Improvement to compute sparsity without WaveformsExtractor (#2410) +* Improve `ZarrSortingExtractor` (#2403) +* Improvement to compute sparsity without `WaveformsExtractor` (#2410) +* Zarr backcompatibility: map `root_path` to `folder_path` (#2451) +* Fix spikes generation on borders #2453 extractors: -preprocessing: +* Add .stream.cbin compatibility to `CompressedBinaryIblExtractor` (#2297) +* Add stream_folders path to `OpenEphysBinaryRecordingExtractor` (#2369) +* Several improvements to NWB extractors: + * Add option for no caching option to the NWB extractor when streaming (#2246, #2248, #2268) + * Fix `NwbSortingExtractor` reading of ragged arrays (#2255) + * Add nwb sorting `remfile` support (#2275) + * Avoid loading `channel_name` property in `NwbRecordingExtractor` (#2285) + * Add hdf5 backend support for Nwb extractors (#2294, #2297, #2341) + * Refactor `NwbSortingSegment` (#2313) + * Add `t_start` argument to NwbSortingExtractor (#2333) + * Add support for NWB-Zarr enhancement and zarr streaming (#2441) +preprocessing: +* Fix filtering rounding error (#2189) +* Fix: save a copy of group ids in `CommonReferenceRecording` (#2215) +* Add `outside_channels_location` option in `detect_bad_channels` (#2250) +* Fix overflow problems with CAR (#2362) +* Fix for Silence periods (saving noise levels) (#2375) +* Add `DecimateRecording` (#2385) +* Add `margin_sd` argument to gaussian filtering (#2389) +* Faster Gaussian filter implementation preprocessing (#2420) +* Faster unpickling of ZScoreRecording (#2431) +* Add bit depth compensation to unsigned_to_signed (#2438) sorters: +* Several updates to SpykingCircus 2 (#2205, #2236, #2244, #2276) +* Handling segments in SC2 and TDC2 (#2208) +* A couple updates to `mountainsort5` sorter (#2225) +* `run_sorter` in container: dump to json or pickle (#2271) +* `run_sorter` in container: add several options for installing spikeinterface (#2273) +* Close `ShellScript` and pipes process at deletion (#2292, #2338) +* Remove deprecated direct function to `run_sorter` (e.g., `run_kilosort2` -> `run_sorter('kilosort2')` (#2355) +* Expose `lam` and `momentum` params in the appropriate kilosorts (#2358) postprocessing: @@ -71,8 +102,8 @@ qualitymetrics: curation: * Fix bug in `mergeunits` (#2443) - * Fix sortingview curation and merge units with array properties (#2427) +* Move computation away from __init__ in duplicated spikes (#2446) widgets: @@ -91,12 +122,20 @@ generation: sortingcomponents: * Strict inegality for sparsity with radius_um (#2277) by yger was merged on Dec 1, 2023 - * Fix memory leak in lsmr solver and optimize correct_motion (#2263) docs: +* Various improvements to docs (#2168, #2229, #2407) +* Improve `ids_to_indices` docstring (#2301) +* Fix for docstring of `get_traces` (#2320) +* Fix RTD warnings (#2348) +* Improve CMR docstring (#2354) +* Correct warning format in neo base extractors (#2357) +* Typo fix for verbose setting in `Multicomparison` (#2399) + ci / packaging / tests: * Add tests for unique names in channel slice and unit selection (#2258) * Add from `__future__` import annotations to core files (#2340) +* Add pickling test to streamers (#2170) From e018b335129d6b4063915e0f84be7eccf7e5d722 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Thu, 1 Feb 2024 10:31:13 +0100 Subject: [PATCH 3/9] Add PRs to be merged for release --- doc/releases/0.100.0.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index a5ef272280..7ff8ff9198 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -47,7 +47,8 @@ core: * Improve `ZarrSortingExtractor` (#2403) * Improvement to compute sparsity without `WaveformsExtractor` (#2410) * Zarr backcompatibility: map `root_path` to `folder_path` (#2451) -* Fix spikes generation on borders #2453 +* Fix spikes generation on borders (#2453) +* Zarr IO for `Templates` object (#2423) extractors: @@ -75,23 +76,27 @@ preprocessing: * Faster Gaussian filter implementation preprocessing (#2420) * Faster unpickling of ZScoreRecording (#2431) * Add bit depth compensation to unsigned_to_signed (#2438) +* Renaming: `GaussianBandpassFilter` -> `GaussianFilter` (and option for low/high pass filter) (#2397) sorters: -* Several updates to SpykingCircus 2 (#2205, #2236, #2244, #2276) -* Handling segments in SC2 and TDC2 (#2208) +* Several updates to SpykingCircus2 (#2205, #2236, #2244, #2276) +* Handling segments in SpykingCircus2 and Tridesclous2 (#2208) * A couple updates to `mountainsort5` sorter (#2225) * `run_sorter` in container: dump to json or pickle (#2271) * `run_sorter` in container: add several options for installing spikeinterface (#2273) * Close `ShellScript` and pipes process at deletion (#2292, #2338) * Remove deprecated direct function to `run_sorter` (e.g., `run_kilosort2` -> `run_sorter('kilosort2')` (#2355) * Expose `lam` and `momentum` params in the appropriate kilosorts (#2358) +* Tridesclous2 update (#2267) postprocessing: * Use sampling_frequency instead of get_sampling_frequency in _make_bins (#2284) * Multi-channel template metrics fix (#2323) * Fix bug in get_repolarization_slope with wrong index type (#2432) +* Estimation of depth for `grid_convolution` localization (#2172) + qualitymetrics: From 80fabcc0e4b7de34aeaf105f7c0ee6b7a712fdde Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Thu, 1 Feb 2024 10:37:32 +0100 Subject: [PATCH 4/9] Add main changes --- doc/releases/0.100.0.rst | 13 ++++++++----- doc/whatisnew.rst | 9 ++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index 7ff8ff9198..15d0891ff4 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -3,14 +3,17 @@ SpikeInterface 0.100.0 release notes ------------------------------------ -2nd February 2024 +5th February 2024 Main changes: -* Windows -* NWB -* joblib -* `run_sorter` in container: add several options for installing spikeinterface (#2273) +* Several improvements and bug fixes for Windows users +* Important refactoring of NWB extractors: + * implemented direct backend implementation (to avoid using `pynwb`) + * sped up streaming using `remfile` + * added support for `zarr` backend +* Removed `joblib` dependency in favor of `ParallelProcessExecutor` +* Improved flexibility when running sorters in container by adding several options for installing `spikeinterface` core: diff --git a/doc/whatisnew.rst b/doc/whatisnew.rst index c84885ef1b..3741a068d6 100644 --- a/doc/whatisnew.rst +++ b/doc/whatisnew.rst @@ -37,7 +37,14 @@ Release notes Version 0.100.0 =============== -* TODO + +* Several improvements and bug fixes for Windows users +* Important refactoring of NWB extractors: + * implemented direct backend implementation (to avoid using `pynwb`) + * sped up streaming using `remfile` + * added support for `zarr` backend +* Removed `joblib` dependency in favor of `ParallelProcessExecutor` +* Improved flexibility when running sorters in container by adding several options for installing `spikeinterface` Version 0.99.1 From 51c0e9ac8398da3e60be132de0a4dc5d2052e948 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 5 Feb 2024 12:00:36 +0100 Subject: [PATCH 5/9] Update release notes --- README.md | 2 +- doc/releases/0.100.0.rst | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 98d43ab3d0..748c885046 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ With SpikeInterface, users can: ## Documentation -Detailed documentation of the latest PyPI release of SpikeInterface can be found [here](https://spikeinterface.readthedocs.io/en/0.99.1). +Detailed documentation of the latest PyPI release of SpikeInterface can be found [here](https://spikeinterface.readthedocs.io/en/0.100.0). Detailed documentation of the development version of SpikeInterface can be found [here](https://spikeinterface.readthedocs.io/en/latest). diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index 15d0891ff4..3cbf7f05a8 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -22,7 +22,7 @@ core: * Use python methods instead of parsing and eleminate try-except in to_dict (#2157) * `WaveformExtractor.is_extension` --> `has_extension` (#2158) -* Speed improvement to `get_empty_units()`` (#2173) +* Speed improvement to `get_empty_units()` (#2173) * Allow precomputing spike trains (#2175) * Add 'percentile' to template modes and `plot_unit_templates` (#2179) * Add `rename_units` method in sorting (#2207) @@ -57,6 +57,8 @@ extractors: * Add .stream.cbin compatibility to `CompressedBinaryIblExtractor` (#2297) * Add stream_folders path to `OpenEphysBinaryRecordingExtractor` (#2369) +* Deprecate `ignore_timestamps_errors` in `OpenEphysLegacyRecordingExtractor` (#2450) +* Better auto-guess of open-ephys format (#2465) * Several improvements to NWB extractors: * Add option for no caching option to the NWB extractor when streaming (#2246, #2248, #2268) * Fix `NwbSortingExtractor` reading of ragged arrays (#2255) @@ -65,7 +67,7 @@ extractors: * Add hdf5 backend support for Nwb extractors (#2294, #2297, #2341) * Refactor `NwbSortingSegment` (#2313) * Add `t_start` argument to NwbSortingExtractor (#2333) - * Add support for NWB-Zarr enhancement and zarr streaming (#2441) + * Add support for NWB-Zarr enhancement and zarr streaming (#2441, #2464) preprocessing: From ffc04586b45c228ee351c3cdd3e5c24285a24900 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 5 Feb 2024 12:06:20 +0100 Subject: [PATCH 6/9] Suggestions and extended main changes --- doc/releases/0.100.0.rst | 14 +++++++++----- doc/whatisnew.rst | 7 +++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index 3cbf7f05a8..fc0a8f8844 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -13,12 +13,15 @@ Main changes: * sped up streaming using `remfile` * added support for `zarr` backend * Removed `joblib` dependency in favor of `ParallelProcessExecutor` -* Improved flexibility when running sorters in container by adding several options for installing `spikeinterface` - +* Improved flexibility when running sorters in containers by adding several options for installing `spikeinterface` +* Add `Templates` class to core, which handles unit templates and sparsity (#1982) +* Added Zarr-backend to `Sorting` objects (`sorting.save(folder="...", format="zarr")`) (#2403) +* Added `SharedmemRecording` for shared memory recordings (#2365) +* Added machinery for moving/interpolating templates for generating hybrid recordings with drift (#2291) core: -* Add `Template`` class (#1982) +* Add `Templates` class (#1982) * Use python methods instead of parsing and eleminate try-except in to_dict (#2157) * `WaveformExtractor.is_extension` --> `has_extension` (#2158) @@ -88,8 +91,8 @@ sorters: * Several updates to SpykingCircus2 (#2205, #2236, #2244, #2276) * Handling segments in SpykingCircus2 and Tridesclous2 (#2208) * A couple updates to `mountainsort5` sorter (#2225) -* `run_sorter` in container: dump to json or pickle (#2271) -* `run_sorter` in container: add several options for installing spikeinterface (#2273) +* `run_sorter` in containers: dump to json or pickle (#2271) +* `run_sorter` in containers: add several options for installing spikeinterface (#2273) * Close `ShellScript` and pipes process at deletion (#2292, #2338) * Remove deprecated direct function to `run_sorter` (e.g., `run_kilosort2` -> `run_sorter('kilosort2')` (#2355) * Expose `lam` and `momentum` params in the appropriate kilosorts (#2358) @@ -128,6 +131,7 @@ generation: * Add a minimum distance in generate_unit_locations (#2147) * Add Poisson statistics to generate_sorting and optimize memory profile (#2226) * Fix add_shift_shuffle section in synthesize_random_firings (#2334) +* Machinery for moving templates and generating hybrid recordings with drift (#2291) sortingcomponents: diff --git a/doc/whatisnew.rst b/doc/whatisnew.rst index 3741a068d6..d34c7dd0db 100644 --- a/doc/whatisnew.rst +++ b/doc/whatisnew.rst @@ -37,14 +37,17 @@ Release notes Version 0.100.0 =============== - * Several improvements and bug fixes for Windows users * Important refactoring of NWB extractors: * implemented direct backend implementation (to avoid using `pynwb`) * sped up streaming using `remfile` * added support for `zarr` backend * Removed `joblib` dependency in favor of `ParallelProcessExecutor` -* Improved flexibility when running sorters in container by adding several options for installing `spikeinterface` +* Improved flexibility when running sorters in containers by adding several options for installing `spikeinterface` +* Add `Templates` class to core, which handles unit templates and sparsity (#1982) +* Added Zarr-backend to `Sorting` objects (`sorting.save(folder="...", format="zarr")`) (#2403) +* Added `SharedmemRecording` for shared memory recordings (#2365) +* Added machinery for moving/interpolating templates for generating hybrid recordings with drift (#2291) Version 0.99.1 From d27beb1a290d718b0b67a3473ecdd93c2ea703dd Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Mon, 5 Feb 2024 12:24:04 +0100 Subject: [PATCH 7/9] API changes --- doc/api.rst | 20 +++++++++++++------- doc/modules/preprocessing.rst | 18 ++++++++++++++++++ doc/releases/0.100.0.rst | 2 ++ doc/whatisnew.rst | 1 + 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index a18263bbef..62ce3f889f 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -159,7 +159,7 @@ spikeinterface.preprocessing .. autofunction:: detect_bad_channels .. autofunction:: directional_derivative .. autofunction:: filter - .. autofunction:: gaussian_bandpass_filter + .. autofunction:: gaussian_filter .. autofunction:: highpass_filter .. autofunction:: highpass_spatial_filter .. autofunction:: interpolate_bad_channels @@ -331,6 +331,18 @@ spikeinterface.curation .. autofunction:: apply_sortingview_curation +spikeinterface.generation +------------------------- + +.. automodule:: spikeinterface.generation + + .. autofunction:: make_linear_displacement + .. autofunction:: move_dense_templates + .. autofunction:: interpolate_templates + .. autoclass:: DriftingTemplates + .. autoclass:: InjectDriftingTemplatesRecording + + spikeinterface.sortingcomponents -------------------------------- @@ -363,9 +375,3 @@ Template Matching .. automodule:: spikeinterface.sortingcomponents.matching .. autofunction:: find_spikes_from_templates - - -spikeinterface.generation -------------------------- - -.. automodule:: spikeinterface.generation diff --git a/doc/modules/preprocessing.rst b/doc/modules/preprocessing.rst index 7d28ffb5a3..fc6eaf5049 100644 --- a/doc/modules/preprocessing.rst +++ b/doc/modules/preprocessing.rst @@ -310,6 +310,24 @@ required. * :py:func:`~spikeinterface.preprocessing.zero_channel_pad()` +gaussian_filter() +^^^^^^^^^^^^^^^^^ + +Implementation of a gaussian filter for high/low/bandpass filters. Note that the the gaussian filter +response is not very steep. + +.. code-block:: python + + # highpass + rec_hp = gaussian_filter(recording=rec, freq_min=300, freq_max=None) + # lowpass + rec_lp = gaussian_filter(recording=rec, freq_min=None, freq_max=500) + # bandpass + rec_bp = gaussian_filter(recording=rec, freq_min=300, freq_max=2000) + +* :py:func:`~spikeinterface.preprocessing.gaussian_filter()` + + Motion/drift correction ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index fc0a8f8844..9346ba885d 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -18,6 +18,8 @@ Main changes: * Added Zarr-backend to `Sorting` objects (`sorting.save(folder="...", format="zarr")`) (#2403) * Added `SharedmemRecording` for shared memory recordings (#2365) * Added machinery for moving/interpolating templates for generating hybrid recordings with drift (#2291) +* Added new fast method for unit/spike/peak localization: `grid_convolution` (#2172) + core: diff --git a/doc/whatisnew.rst b/doc/whatisnew.rst index d34c7dd0db..bebd799f33 100644 --- a/doc/whatisnew.rst +++ b/doc/whatisnew.rst @@ -48,6 +48,7 @@ Version 0.100.0 * Added Zarr-backend to `Sorting` objects (`sorting.save(folder="...", format="zarr")`) (#2403) * Added `SharedmemRecording` for shared memory recordings (#2365) * Added machinery for moving/interpolating templates for generating hybrid recordings with drift (#2291) +* Added new fast method for unit/spike/peak localization: `grid_convolution` (#2172) Version 0.99.1 From 5f1b6cb0a32073c24bb3c90d90290f55648f7105 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Tue, 6 Feb 2024 09:05:58 +0100 Subject: [PATCH 8/9] DEV_MODE=False --- doc/releases/0.100.0.rst | 7 ++++--- pyproject.toml | 4 ++-- src/spikeinterface/__init__.py | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/releases/0.100.0.rst b/doc/releases/0.100.0.rst index 9346ba885d..d39b5569da 100644 --- a/doc/releases/0.100.0.rst +++ b/doc/releases/0.100.0.rst @@ -3,7 +3,7 @@ SpikeInterface 0.100.0 release notes ------------------------------------ -5th February 2024 +6th February 2024 Main changes: @@ -57,6 +57,7 @@ core: * Zarr backcompatibility: map `root_path` to `folder_path` (#2451) * Fix spikes generation on borders (#2453) * Zarr IO for `Templates` object (#2423) +* Avoid double parsing in Plexon (#2459) extractors: @@ -86,7 +87,7 @@ preprocessing: * Faster Gaussian filter implementation preprocessing (#2420) * Faster unpickling of ZScoreRecording (#2431) * Add bit depth compensation to unsigned_to_signed (#2438) -* Renaming: `GaussianBandpassFilter` -> `GaussianFilter` (and option for low/high pass filter) (#2397) +* Renaming: `GaussianBandpassFilter` -> `GaussianFilter` (and option for low/high pass filter) (#2397, #2466) sorters: @@ -153,5 +154,5 @@ docs: ci / packaging / tests: * Add tests for unique names in channel slice and unit selection (#2258) -* Add from `__future__` import annotations to core files (#2340) +* Add from `__future__` import annotations to all files for Python3.8 (#2340, #2468) * Add pickling test to streamers (#2170) diff --git a/pyproject.toml b/pyproject.toml index 5ff2474172..a3384a5482 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,8 +119,8 @@ 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 = [ 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 197b73a5db8d6f5cf2f2b250b671ff23470b8e37 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Tue, 6 Feb 2024 09:34:03 +0100 Subject: [PATCH 9/9] Tiny ufunc fix in motion_estimation --- src/spikeinterface/sortingcomponents/motion_estimation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spikeinterface/sortingcomponents/motion_estimation.py b/src/spikeinterface/sortingcomponents/motion_estimation.py index e7b5e23d15..ef3a39bed1 100644 --- a/src/spikeinterface/sortingcomponents/motion_estimation.py +++ b/src/spikeinterface/sortingcomponents/motion_estimation.py @@ -322,7 +322,7 @@ def run( if histogram_depth_smooth_um is not None: bins = np.arange(motion_histogram.shape[1]) * bin_um - bins -= np.mean(bins) + bins = bins - np.mean(bins) smooth_kernel = np.exp(-(bins**2) / (2 * histogram_depth_smooth_um**2)) smooth_kernel /= np.sum(smooth_kernel) motion_histogram = scipy.signal.fftconvolve(motion_histogram, smooth_kernel[None, :], mode="same", axes=1)