Interactive visualization and manual spike sorting of large-scale ephys data
Project description
phy: interactive visualization and manual spike sorting of large-scale ephys data
phy is an open-source Python library providing a graphical user interface for visualization and manual curation of large-scale electrophysiological data. It is optimized for high-density multielectrode arrays containing hundreds to thousands of recording sites, especially Neuropixels recordings.
Current release:
phy 2.1.0is a maintenance-focused release that improves installation and GUI reliability on current systems. See the release notes for details and compatibility notes.
Current status
As of July 2026, phy 2.1.0 is the current stable release for the 2.x line.
The main goals of this release are:
- dependency and packaging modernization
- replacing a fragile legacy web-based GUI component with a Qt-native implementation
- improving display reliability on modern systems
- incorporating fixes identified during release-candidate testing
Dataset formats are unchanged. Some plugins that relied on internal HTML or web-based GUI components may need updates.
Please report any issues or compatibility regressions on GitHub issues.
Supported workflows
phy currently provides three main entry points:
- Template GUI: the main and recommended workflow for datasets sorted with KiloSort and Spyking Circus
- Kwik GUI: a legacy workflow for datasets sorted with klusta and klustakwik2
- Trace GUI: an experimental raw-data viewer for opening continuous electrophysiology recordings directly
Current testing and maintenance work is focused on modern Linux, macOS, and Windows environments. Linux is still the best-covered platform.
Installation
Install phy in a fresh Python 3.10+ environment:
python -m pip install --upgrade pip
pip install phy
This installs the GUI runtime dependencies as part of the main package.
If you plan to use the legacy Kwik GUI, also install:
pip install klusta klustakwik2
Quick start
Open the Template GUI on a spike sorting output directory containing params.py:
cd path/to/my/spikesorting/output
phy template-gui params.py
Other useful commands:
phy template-describe params.py
phy kwik-gui path/to/file.kwik
phy trace-gui path/to/raw.bin --sample-rate 30000 --dtype int16 --n-channels 384
Available GUIs and commands
Template GUI
Use the Template GUI for current template-based workflows such as KiloSort and Spyking Circus.
phy template-gui params.py
To inspect a dataset from the terminal without launching the GUI:
phy template-describe params.py
Kwik GUI
The Kwik GUI is still available for legacy kwik datasets, but it is no longer the primary workflow.
phy kwik-gui path/to/file.kwik
Trace GUI
The Trace GUI is still experimental and opens raw electrophysiology recordings directly.
phy trace-gui path/to/raw.bin --sample-rate 30000 --dtype int16 --n-channels 384
Running phy from Python
You can also launch phy from Python or IPython, which can be useful for debugging or profiling:
from phy.apps.template import template_gui
template_gui("params.py")
Developer setup
To work on phy itself in a fresh checkout:
git clone git@github.com:cortex-lab/phy.git
cd phy
uv sync --dev
If you are working on phy together with a local checkout of phylib, install that checkout in editable mode:
git clone git@github.com:cortex-lab/phylib.git
cd phylib
pip install -e . --upgrade
Troubleshooting and docs
Credits
phy is developed and maintained by Cyrille Rossant.
Contributors to the repository are:
- Maxime Beau
- Alessio Buccino
- Thad Czuba
- Michael Economo
- Einsied
- Cedric Gestes
- Yaroslav Halchenko
- Max Hunter
- Shabnam Kadir
- Zach McKenzie
- Sam Minkowicz
- Christopher Nolan
- Jesús Peñaloza
- Luke Shaheen
- Martin Spacek
- Nick Steinmetz
- Olivier Winter
- szapp
- ycanerol
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phy-2.1.0.tar.gz.
File metadata
- Download URL: phy-2.1.0.tar.gz
- Upload date:
- Size: 496.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f3f1588e774c06606db26d0ce1dcec50ec768dca8c51f1e5cfcda001cf80cd0
|
|
| MD5 |
3096e94acbcc7cc25fc5fa1c3b478177
|
|
| BLAKE2b-256 |
b675689cc39eb9d3c75e21b2a34a0f2f51417699039521cc9d2472f5afe3bcee
|
File details
Details for the file phy-2.1.0-py3-none-any.whl.
File metadata
- Download URL: phy-2.1.0-py3-none-any.whl
- Upload date:
- Size: 539.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47850e27b428a3c70a02e77aebb1f2c2d24eb9c139a9e4ccd82e9333ecc233df
|
|
| MD5 |
d7d048bbdc98fd4ef2d60d7de3d34fb9
|
|
| BLAKE2b-256 |
f308affeb29cfcdd90392c91e41442952f85f95f8b1ba14c71f865b7ed957ac6
|