phy: interactive visualization and manual spike sorting of large-scale ephys data
Python
434
5,138 commits
updated Oct 16, 2026
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.
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:
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.
phy currently provides three main entry points:
Current testing and maintenance work is focused on modern Linux, macOS, and Windows environments. Linux is still the best-covered platform.
The recommended installation uses
uv, which installs
phy and its Python dependencies in an isolated environment:
uv tool install --python 3.12 phy
phy --version
This installs the GUI runtime dependencies as part of the main package.
The legacy Kwik GUI needs a regular virtual environment because one of its
dependencies requires special build handling. See the installation guide for
the tested uv commands.
See the installation guide
for instructions to install uv, legacy Kwik support, a venv/pip alternative,
source checkouts, and installation verification.
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
Before curating your own data, review the dataset requirements and follow the first-ten-minutes guide.
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
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
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
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")
For a fresh editable installation using the latest commits of both phylib and phy:
mkdir phy-source
cd phy-source
git clone https://github.com/cortex-lab/phylib.git
git clone https://github.com/cortex-lab/phy.git
cd phy
uv sync --dev
uv pip install --editable ../phylib
Windows PowerShell instructions, update commands, and verification of the exact commits are in the source installation guide.
phy is developed and maintained by Cyrille Rossant.
Contributors to the repository are:
phy: interactive visualization and manual spike sorting of large-scale ephys data
Python
434
5,138 commits
updated Oct 16, 2026
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.
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:
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.
phy currently provides three main entry points:
Current testing and maintenance work is focused on modern Linux, macOS, and Windows environments. Linux is still the best-covered platform.
The recommended installation uses
uv, which installs
phy and its Python dependencies in an isolated environment:
uv tool install --python 3.12 phy
phy --version
This installs the GUI runtime dependencies as part of the main package.
The legacy Kwik GUI needs a regular virtual environment because one of its
dependencies requires special build handling. See the installation guide for
the tested uv commands.
See the installation guide
for instructions to install uv, legacy Kwik support, a venv/pip alternative,
source checkouts, and installation verification.
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
Before curating your own data, review the dataset requirements and follow the first-ten-minutes guide.
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
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
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
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")
For a fresh editable installation using the latest commits of both phylib and phy:
mkdir phy-source
cd phy-source
git clone https://github.com/cortex-lab/phylib.git
git clone https://github.com/cortex-lab/phy.git
cd phy
uv sync --dev
uv pip install --editable ../phylib
Windows PowerShell instructions, update commands, and verification of the exact commits are in the source installation guide.
phy is developed and maintained by Cyrille Rossant.
Contributors to the repository are:
427 followers · starred Apr 2017