Spike detection from HS2, used for integration in SpikeInterface
Reason this release was yanked:
rc
Project description
hs-detection
This is the package implementing the spike detection algorithm in Herding Spikes, adapted from the codebase at HS2. The algorithm is described in the following paper:
J.-O. Muthmann, H. Amin, E. Sernagor, A. Maccione, D. Panas, L. Berdondini, U. S. Bhalla, M. H. Hennig. "Spike Detection for Large Neural Populations Using High Density Multielectrode Arrays". In: Frontiers in Neuroinformatics 9 (2015). doi: 10.3389/fninf.2015.00028.
This package is to be used as a backend for Spikeinterface's sortingcomponents. The implementation is further optimized based on HS2 to handle large-scale recordings and can achieve real-time detection and localization on 6144-channel, 32 kHz data on a Haswell server CPU (single core). Parallelization on multiple cores can deliver an additional 2x speedup.
The software was first developed as part of the MSc project "Re-implementation and Optimization of a Scalable Spike Detection Algorithm for Large-Scale Extracellular Recordings" by Rickey K. Liang (supervisor Matthias H. Hennig), and the code is released under the GPL-3.0 license, inheriting HS2.
Installation
This package is to be invoked from SpikeInterface; please refer to the installation guide there to set up the environment. Python 3.9+ is suggested for development and testing, but Python 3.8 is also supported for users invoking from SpikeInterface.
The parallelization is controlled by env var OMP_NUM_THREADS
. Set to 1 for single core running. 2x speedup achieved by 4~6 (depending on platform).
Via pip
pip install hs-detection
The NumPy requirement is hardcoded to v1.21.x for consistency in Cython interface. To override (might be risky), use the following to rebuild the Cython code:
pip install cython
pip install numpy==YOUR_VERSION
pip install --no-deps hs-detection
From source
git clone https://github.com/lkct/hs-detection.git
cd hs-detection
# pip install . # for install
pip install -e . # for develop
cd ..
Please note that a C++ compiler (requires C++17 compatibility) should be properly configured to build the C++ extension for Python.
Versions
0.3.1
The first version officially released to the community--the version for the MSc Dissertation with updated meta-info and readme.
Known issues
The following are performance issues not addressed in the current implementation, but could lead to significant differences in corresponding cases.
- The common median reference (CMR) runs too slow compared to common average reference (CAR) which can reach real-time.
- Shortcuts are not set for code paths other than scaling&CAR (ref). A +20% speed in C++ code was gained for the scaling&CAR shortcut.
int16
data without the need to rescale could be expected as input from SI, but extra type-casts to and fromfloat32
are now enforced.
Contact
The code was developed when the author was an MSc student at the School of Informatics, University of Edinburgh. Please reach out to Dr MH Hennig who was the project supervisor.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file hs-detection-0.3.1rc1.tar.gz
.
File metadata
- Download URL: hs-detection-0.3.1rc1.tar.gz
- Upload date:
- Size: 118.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba8c4bdb2fca4631f436b93b5d3c2e24ae84e3d4ad0f51a136a9a40f02d3ec71 |
|
MD5 | a896a53452502422ba6332cd17f07ad4 |
|
BLAKE2b-256 | cf7ab2b14a5432bb9446b54fcb2f03185ef09bf16f8300d092070f4d8a678cc7 |