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
Metadata
Release files for phy 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| phy-2.1.0.tar.gz | 496.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| phy-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.0 MB
Release files / phy-2.1.0.tar.gz
| Download URL | phy-2.1.0.tar.gz |
|---|---|
| Size | 496.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f3f1588e774c06606db26d0ce1dcec50ec768dca8c51f1e5cfcda001cf80cd0
|
|
BLAKE2b-256 checksum How to use checksums |
b675689cc39eb9d3c75e21b2a34a0f2f51417699039521cc9d2472f5afe3bcee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.10
|
Release files / phy-2.1.0-py3-none-any.whl
| Download URL | phy-2.1.0-py3-none-any.whl |
|---|---|
| Size | 539.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47850e27b428a3c70a02e77aebb1f2c2d24eb9c139a9e4ccd82e9333ecc233df
|
|
BLAKE2b-256 checksum How to use checksums |
f308affeb29cfcdd90392c91e41442952f85f95f8b1ba14c71f865b7ed957ac6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.10
|