Skip to main content

CATSort

CATSort (Collision-Aware Template 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 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.

Metadata

Release files for CATSort 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CATSort 1.0.2
File Size Uploaded
catsort-1.0.2.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CATSort 1.0.2
File Interpreter ABI Platform
catsort-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / catsort-1.0.2.tar.gz

Download URL catsort-1.0.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6cc0f6de399d0d7cb250abea70c9fcfeea35265c8a40f51fc13a171f98c1ac11
BLAKE2b-256 checksum
How to use checksums
ae7e29eb58a1389db53193573006725e89e9d2143c4b9323c250b23314e0e45a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

Release files / catsort-1.0.2-py3-none-any.whl

Download URL catsort-1.0.2-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a15966b6f0f61884b45f0babdff130a559ac73eb93180c5f87f11c3a7bd82e0
BLAKE2b-256 checksum
How to use checksums
7303b0864e99a0bd6827d58079625b56fd28725606177bd69fded9054b7ff38f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page