Skip to main content

A collision-aware template matching spike sorter.

Project description

CATSort

CATSort (Collision-Aware with Template matching Sort) is a robust spike sorter designed to handle overlapping spikes (collisions) with high precision using a specific collision-handling stage before clustering followed by template matching.

Key Features

  • Collision Handling: Automatically identifies and flags collided spikes using multi-criterion feature analysis (amplitude, width, energy).
  • Template Matching: Robust spike extraction using template-based matching (including 'wobble' for now).
  • Flexible Schemes: Choose between an adaptive threshold optimization or an original fixed MAD (Median Absolute Deviation) multiplier scheme.
  • SpikeInterface Integration: Fully compatible with the SpikeInterface ecosystem.

Installation

You can install catsort via pip:

pip install catsort

Or from source:

git clone https://github.com/lucasbeziers/CATSort.git
cd CATSort
pip install -e .

Quick Start

import spikeinterface.extractors as se
from catsort import run_catsort

# Load your recording
recording = se.read_binary("path_to_data.dat", sampling_frequency=30000, num_channels=384, dtype="int16")

# Run CATSort
sorting = run_catsort(recording)

# The result is a SpikeInterface Sorting object
print(sorting)

Parameters

CATSort offers several parameters to fine-tune its behavior:

  • scheme: 'original' or 'adaptive'.
    • 'adaptive' uses temporal collisions to optimize thresholds.
    • 'original' uses fixed MAD multipliers.
  • mad_multiplier_amplitude, mad_multiplier_width, mad_multiplier_energy: (Default: 7.0, 10.0, 15.0) Used when scheme='original'.
  • detect_threshold: Spike detection threshold in standard deviations (Default: 5).

License

MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catsort-1.0.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

catsort-1.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file catsort-1.0.0.tar.gz.

File metadata

  • Download URL: catsort-1.0.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsort-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8bb8718e1b3aed453737f93b92582c439944958a6a48fe319e86bd04aa829bb1
MD5 1527ef271a8cd34ad5e645e6a73583d8
BLAKE2b-256 e27d9804e896910c4ca39ca948e8d46a32d80293ab4e706d83aa5466d7a84eb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for catsort-1.0.0.tar.gz:

Publisher: publish.yml on lucasbeziers/CATSort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file catsort-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: catsort-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for catsort-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d05c33acdbae2b5202d57752a569ce81f621a3d399a4767d5d476ca2f77faa8f
MD5 3ff22fb86682980c90bfad7c9bd3348b
BLAKE2b-256 2c147ea57916ddb69faacdde72b839215fbdcf1ad2f0d70b72232d0e45d9a0f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for catsort-1.0.0-py3-none-any.whl:

Publisher: publish.yml on lucasbeziers/CATSort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page