Skip to main content

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

Build Status codecov.io Documentation Status GitHub release PyPI release

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).

Phy provides two GUIs:

  • Template GUI (recommanded): for datasets sorted with KiloSort and Spyking Circus,
  • Kwik GUI (legacy): for datasets sorted with klusta and klustakwik2.

phy 2.0b1 screenshot

What's new

  • [7 Feb 2020] Release of phy 2.0 beta 1, with many new views, new features, various improvements and bug fixes...

Links

Installation instructions

Phy requires a recent GPU and an SSD for storing your data (the GUI may be slow if the data is on an HDD).

  1. Install the latest version of Anaconda 64-bit with Python 3.

  2. Open a terminal and type:

conda create -n phy2 python=3.7 pip numpy matplotlib scipy scikit-learn h5py pyqt cython pillow -y
conda activate phy2
pip install phy --pre --upgrade
# Only if you plan to use the Kwik GUI:
# pip install klusta klustakwik2
  1. Phy should now be installed. Open the GUI on a dataset as follows (the phy2 environment should still be activated):
cd path/to/my/spikesorting/output
phy template-gui params.py

Dealing with the error ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidget

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.

Upgrading from phy 1 to phy 2

  • Do not install phy 1 and phy 2 in the same conda environment.
  • It is recommended to delete ~/.phy/*GUI/state.json when upgrading.

Developer instructions

To install the development version of phy in a fresh environment, do:

git clone git@github.com:cortex-lab/phy.git
cd phy
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
cd ..
git clone git@github.com:cortex-lab/phylib.git
cd phylib
pip install -e . --upgrade

Troubleshooting

Running phy from a Python script

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:

from phy.apps.template import template_gui
template_gui("params.py")

Credits

phy is developed and maintained by Cyrille Rossant.

Contributors to the repository are:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phy-2.0b4.zip (604.3 kB view details)

Uploaded Source

File details

Details for the file phy-2.0b4.zip.

File metadata

  • Download URL: phy-2.0b4.zip
  • Upload date:
  • Size: 604.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.2.0 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for phy-2.0b4.zip
Algorithm Hash digest
SHA256 b38f27c21efc542a020d2c22c714daef53d31ce9a59a548a3b289e76effaab50
MD5 d837ce39145a7adec01fca6e28192cf4
BLAKE2b-256 bcab56cd7a8452aa8ef439581c2bfbe00401933ec96ac04286952e28e0db74a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page