skip to content

SPIKEPRINT

From raw extracellular channel to labeled unit, on the command line — with a quality report another human can audit.

year
2024
area
neural instrumentation
status
in use in two labs
stack
Python · NumPy · CLI · signal processing

SPIKEPRINT view code

the problem

Spike sorting is the step between what the electrode captures and what science uses, and it's still the most fragile ritual in electrophysiology. Every lab has its own sequence of tools glued with scripts; dependencies break between Python versions; and the parameter that matters most — the detection threshold — is usually set by eye, by whoever is in a hurry.

The worst part isn't the rework. It's that the result (how many units, at what quality) changes with the recipe, and almost nobody records the recipe. Comparisons between experiments become faith.

the approach

SPIKEPRINT is a command-line tool with strong opinions: one fixed pipeline, pinned versions, and a configuration file that lives with the data. Filtering, threshold detection (with automatic noise estimation) and PCA clustering live in a single binary — no glued notebooks.

The decision that defined the project was the report: every run emits an HTML file with each unit's mean traces, refractory violation rate and noise proportion — the minimum for another researcher to say “I trust this unit” without reprocessing anything. We version the binary alongside the dataset; the version number goes into the report.

Technically: butterworth filtering over streams (pure NumPy, no exotic dependencies), detection by robust deviation (median × k), and k-means clustering validated by silhouette. Preprocessing is slow and honest: 40 minutes per recording hour, on any lab laptop — no GPU required.

where it stands

In use at two partner labs. The pipeline processes ~2 TB/month between them. The most common complaint — “no graphical interface” — is deliberate: a CLI forces the explicit config file, which is the part that kills the ritual.

next: VERIDOSE