|
6 | 6 | [](https://github.com/cortex-lab/phy/releases/latest) |
7 | 7 | [](https://pypi.python.org/pypi/phy) |
8 | 8 |
|
| 9 | +[**phy**](https://github.com/cortex-lab/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. |
9 | 10 |
|
10 | | -[**phy**](https://github.com/cortex-lab/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 (mostly [Neuropixels probes](https://www.ucl.ac.uk/neuropixels/)). |
| 11 | +> **Release candidate available:** `phy 2.1.0rc1` is available for testing on PyPI. This maintenance-focused release candidate aims to improve installation and GUI reliability on current systems. See the [release notes](https://phy.readthedocs.io/en/latest/release/) for installation instructions, compatibility notes, and testing guidance. |
11 | 12 |
|
12 | | -Phy provides two GUIs: |
| 13 | +[](https://user-images.githubusercontent.com/1942359/74028054-c284b880-49a9-11ea-8815-1b7e727a8644.png) |
13 | 14 |
|
14 | | -* **Template GUI** (recommended): for datasets sorted with KiloSort and Spyking Circus, |
15 | | -* **Kwik GUI** (legacy): for datasets sorted with klusta and klustakwik2. |
| 15 | +## Current status |
16 | 16 |
|
| 17 | +As of March 2026, `phy 2.1.0rc1` is a maintenance-focused release candidate for the current 2.x line. |
17 | 18 |
|
18 | | -[](https://user-images.githubusercontent.com/1942359/74028054-c284b880-49a9-11ea-8815-1b7e727a8644.png) |
| 19 | +The main goals of this release are: |
19 | 20 |
|
| 21 | +* dependency and packaging modernization |
| 22 | +* replacing a fragile legacy web-based GUI component with a Qt-native implementation |
| 23 | +* improving display reliability on modern systems |
| 24 | +* collecting feedback from beta testers before a final `2.1.0` release |
20 | 25 |
|
21 | | -## What's new |
22 | | -* [5 June 2024] phy 2.0 beta 6, bug fixes, install work, fixing some deprecations |
23 | | -* [7 Sep 2021] Release of phy 2.0 beta 5, with some install and bug fixes |
24 | | -* [7 Feb 2020] Release of phy 2.0 beta 1, with many new views, new features, various improvements and bug fixes... |
| 26 | +Dataset formats are unchanged. Some plugins that relied on internal HTML or web-based GUI components may need updates. |
25 | 27 |
|
| 28 | +If you would like to test this release candidate, install it in a fresh Python 3.10+ environment: |
26 | 29 |
|
27 | | -## Links |
| 30 | +```bash |
| 31 | +python -m pip install --upgrade pip |
| 32 | +pip install "phy==2.1.0rc1" |
| 33 | +``` |
28 | 34 |
|
29 | | -* [Documentation](http://phy.readthedocs.org/en/latest/) |
30 | | -* [Mailing list](https://groups.google.com/forum/#!forum/phy-users) |
| 35 | +Please report any issues or compatibility regressions on [GitHub issues](https://github.com/cortex-lab/phy/issues). |
31 | 36 |
|
| 37 | +## Supported workflows |
32 | 38 |
|
33 | | -## Hardware requirements |
| 39 | +phy currently provides three main entry points: |
34 | 40 |
|
35 | | -It is recommended to store the data on a SSD for performance reasons. |
| 41 | +* **Template GUI**: the main and recommended workflow for datasets sorted with KiloSort and Spyking Circus |
| 42 | +* **Kwik GUI**: a legacy workflow for datasets sorted with klusta and klustakwik2 |
| 43 | +* **Trace GUI**: an experimental raw-data viewer for opening continuous electrophysiology recordings directly |
36 | 44 |
|
37 | | -There are no specific GPU requirements as long as relatively recent graphics and OpenGL drivers are installed on the system. |
| 45 | +Current testing and maintenance work is focused on modern Linux, macOS, and Windows environments. Linux is still the best-covered platform, but cross-platform testing is active during the `2.1.0rc1` cycle. |
38 | 46 |
|
| 47 | +## Installation |
39 | 48 |
|
40 | | -## Installation instructions |
| 49 | +Install phy in a fresh Python 3.10+ environment: |
41 | 50 |
|
42 | | -Run the following commands in a terminal (currently working for Linux machines): |
| 51 | +```bash |
| 52 | +python -m pip install --upgrade pip |
| 53 | +pip install phy |
| 54 | +``` |
43 | 55 |
|
44 | | -1. Create a new conda environment with the conda dependencies: |
| 56 | +This installs the GUI runtime dependencies as part of the main package. |
45 | 57 |
|
46 | | - ``` |
47 | | - conda create -n phy2 -y python=3.11 cython dask h5py joblib matplotlib numpy pillow pip pyopengl pyqt pyqtwebengine pytest python qtconsole requests responses scikit-learn scipy traitlets |
48 | | - ``` |
| 58 | +If you plan to use the legacy Kwik GUI, also install: |
49 | 59 |
|
50 | | -2. Activate the new conda environment with `conda activate phy2` |
| 60 | +```bash |
| 61 | +pip install klusta klustakwik2 |
| 62 | +``` |
51 | 63 |
|
52 | | -3. Install the development version of phy: `pip install git+https://github.com/cortex-lab/phy.git` |
| 64 | +For release-candidate testing specifically, install the exact RC version instead: |
53 | 65 |
|
54 | | -4. [OPTIONAL] If you plan to use the Kwik GUI, type `pip install klusta klustakwik2` |
| 66 | +```bash |
| 67 | +pip install "phy==2.1.0rc1" |
| 68 | +``` |
55 | 69 |
|
56 | | -5. Phy should now be installed. Open the GUI on a dataset as follows (the phy2 environment should still be activated): |
| 70 | +## Quick start |
| 71 | + |
| 72 | +Open the Template GUI on a spike sorting output directory containing `params.py`: |
57 | 73 |
|
58 | 74 | ```bash |
59 | 75 | cd path/to/my/spikesorting/output |
60 | 76 | phy template-gui params.py |
61 | 77 | ``` |
62 | 78 |
|
63 | | -6. If there are problems with this method we also have an `environment.yml` file which allows for |
64 | | -automatic install of the necessary packages. Give that a try. |
| 79 | +Other useful commands: |
65 | 80 |
|
| 81 | +```bash |
| 82 | +phy template-describe params.py |
| 83 | +phy kwik-gui path/to/file.kwik |
| 84 | +phy trace-gui path/to/raw.bin --sample-rate 30000 --dtype int16 --n-channels 384 |
| 85 | +``` |
66 | 86 |
|
67 | | -### Dealing with the error `ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidget` |
| 87 | +## Available GUIs and commands |
68 | 88 |
|
69 | | -In some environments, you might get an error message related to QtWebEngineWidget. Run the command `pip install PyQtWebEngine` and try launching phy again. This command should not run if the error message doesn't appear, as it could break the PyQt5 installation. |
| 89 | +### Template GUI |
70 | 90 |
|
| 91 | +Use the Template GUI for current template-based workflows such as KiloSort and Spyking Circus. |
71 | 92 |
|
72 | | -### Upgrading from phy 1 to phy 2 |
| 93 | +```bash |
| 94 | +phy template-gui params.py |
| 95 | +``` |
73 | 96 |
|
74 | | -* Do not install phy 1 and phy 2 in the same Python environment. |
75 | | -* It is recommended to delete `~/.phy/*GUI/state.json` when upgrading. |
| 97 | +To inspect a dataset from the terminal without launching the GUI: |
76 | 98 |
|
| 99 | +```bash |
| 100 | +phy template-describe params.py |
| 101 | +``` |
77 | 102 |
|
78 | | -### Developer instructions (and instructions for some Windows machines) |
| 103 | +### Kwik GUI |
79 | 104 |
|
80 | | -To install the development version of phy in a fresh environment, do: |
| 105 | +The Kwik GUI is still available for legacy kwik datasets, but it is no longer the primary workflow. |
81 | 106 |
|
82 | 107 | ```bash |
83 | | -git clone git@github.com:cortex-lab/phy.git |
84 | | -cd phy |
85 | | -pip install -r requirements.txt |
86 | | -pip install -r requirements-dev.txt |
87 | | -pip install -e . |
88 | | -cd .. |
89 | | -git clone git@github.com:cortex-lab/phylib.git |
90 | | -cd phylib |
91 | | -pip install -e . --upgrade |
| 108 | +phy kwik-gui path/to/file.kwik |
92 | 109 | ``` |
93 | 110 |
|
94 | | -### Mac Install |
| 111 | +### Trace GUI |
95 | 112 |
|
96 | | -Since the switch to M-series chips Mac install for Phy is not being officially supported. |
97 | | -Rarely people are able to hack together a version with old versions of python etc. |
| 113 | +The Trace GUI is still experimental and opens raw electrophysiology recordings directly. |
98 | 114 |
|
99 | | -### Troubleshooting |
| 115 | +```bash |
| 116 | +phy trace-gui path/to/raw.bin --sample-rate 30000 --dtype int16 --n-channels 384 |
| 117 | +``` |
100 | 118 |
|
101 | | -* [See a list of common issues.](https://phy.readthedocs.io/en/latest/troubleshooting/) |
102 | | -* [Raise a GitHub issue.](https://github.com/cortex-lab/phy/issues) |
| 119 | +## Running phy from Python |
103 | 120 |
|
| 121 | +You can also launch phy from Python or IPython, which can be useful for debugging or profiling: |
104 | 122 |
|
105 | | -## Running phy from a Python script |
| 123 | +```python |
| 124 | +from phy.apps.template import template_gui |
106 | 125 |
|
107 | | -In addition to launching phy from the terminal with the `phy` command, you can also launch it from a Python script or an IPython terminal. This may be useful when debugging or profiling. Here's a code example to copy-paste in a new `launch.py` text file within your data directory: |
| 126 | +template_gui("params.py") |
| 127 | +``` |
108 | 128 |
|
| 129 | +## Developer setup |
| 130 | + |
| 131 | +To work on phy itself in a fresh checkout: |
| 132 | + |
| 133 | +```bash |
| 134 | +git clone git@github.com:cortex-lab/phy.git |
| 135 | +cd phy |
| 136 | +uv sync --dev |
109 | 137 | ``` |
110 | | -from phy.apps.template import template_gui |
111 | | -template_gui("params.py") |
| 138 | + |
| 139 | +If you are working on phy together with a local checkout of `phylib`, install that checkout in editable mode: |
| 140 | + |
| 141 | +```bash |
| 142 | +git clone git@github.com:cortex-lab/phylib.git |
| 143 | +cd phylib |
| 144 | +pip install -e . --upgrade |
112 | 145 | ``` |
113 | 146 |
|
| 147 | +## Troubleshooting and docs |
| 148 | + |
| 149 | +* [Documentation](https://phy.readthedocs.io/en/latest/) |
| 150 | +* [Release notes](https://phy.readthedocs.io/en/latest/release/) |
| 151 | +* [Troubleshooting](https://phy.readthedocs.io/en/latest/troubleshooting/) |
| 152 | +* [GitHub issues](https://github.com/cortex-lab/phy/issues) |
| 153 | +* [Mailing list](https://groups.google.com/forum/#!forum/phy-users) |
114 | 154 |
|
115 | 155 | ## Credits |
116 | 156 |
|
117 | 157 | **phy** is developed and maintained by [Cyrille Rossant](https://cyrille.rossant.net). |
118 | 158 |
|
119 | 159 | * [International Brain Laboratory](https://internationalbrainlab.org) |
120 | | -* [Cortex Lab (UCL)](https://www.ucl.ac.uk/cortexlab/) ([Kenneth Harris](https://www.ucl.ac.uk/biosciences/people/harris-kenneth) and [Matteo Carandini](https://www.carandinilab.net/)). |
| 160 | +* [Cortex Lab (UCL)](https://www.ucl.ac.uk/cortexlab/) ([Kenneth Harris](https://www.ucl.ac.uk/biosciences/people/harris-kenneth) and [Matteo Carandini](https://www.carandinilab.net/)) |
121 | 161 |
|
122 | 162 | Contributors to the repository are: |
123 | 163 |
|
| 164 | +* Maxime Beau |
124 | 165 | * [Alessio Buccino](https://github.com/alejoe91) |
| 166 | +* Thad Czuba |
125 | 167 | * [Michael Economo](https://github.com/mswallac) |
| 168 | +* Einsied |
126 | 169 | * [Cedric Gestes](https://github.com/cgestes) |
127 | | -* [Dan Goodman](http://thesamovar.net/) |
| 170 | +* Yaroslav Halchenko |
128 | 171 | * [Max Hunter](https://iris.ucl.ac.uk/iris/browse/profile?upi=MLDHU99) |
129 | 172 | * [Shabnam Kadir](https://iris.ucl.ac.uk/iris/browse/profile?upi=SKADI56) |
| 173 | +* [Zach McKenzie](https://github.com/zm711) |
| 174 | +* Sam Minkowicz |
130 | 175 | * [Christopher Nolan](https://github.com/crnolan) |
| 176 | +* [Jesús Peñaloza](https://github.com/jpenalozaa) |
| 177 | +* [Luke Shaheen](https://github.com/LukeShaheen) |
131 | 178 | * [Martin Spacek](http://mspacek.github.io/) |
132 | 179 | * [Nick Steinmetz](http://www.nicksteinmetz.com/) |
| 180 | +* Olivier Winter |
| 181 | +* szapp |
| 182 | +* ycanerol |
0 commit comments