Qt GUI for spikeinterface
Project description
spikeinterface-gui
GUI for spikeinterface objects without data copy.
This is a cross platform interactive viewer to inspect the final results and quality of any spike sorter supported by spikeinterface (kilosort, spykingcircus, tridesclous, mountainssort, yass, ironclust, herdingspikes, hdsort, klusta...)
This interactive GUI offer several views that dynamically refresh other views. This allows us to very quickly check the strengths and weaknesses of any sorter output.
Contrary to other viewers (like phy), this viewer skips the tedious and long step of copying and reformating the entire dataset (filtered signal + waveform + PCA) to a particular format or folder organisation. This gui is built on top of spikeinterface objects (Recording, Sorting, WaveformExtractor) These objects are "lazy" and retrieve data on the fly (no copy!). And contrary to phy, this is a view only tool : no manual curation at the moment (split/merge/trash have to be done outside).
This viewer internally use Qt (with PySide6, PyQT6 or PyQt5) and pyqtgraph. And so, this viewer is a local desktop app (old school!!). There is a web based viewer work-in-progress here.
Launch
In order to use this viewer you will need to know a bit of spikeinterface
Step 1 : extract waveforms
You first need to "extract waveform" with spikeinterface See help here
Note that:
- not all waveform snippets are extracted (See
max_spikes_per_unit
) only some of them - this step is cached to a folder (and can be reloaded)
- this step can be run in parallel (and so is quite fast)
- optionally PCA can be computed and displayed
Example:
import spikeinterface.full as si
recording = si.read_XXXX('/path/to/my/recording')
recording_filtered = si.bandpass_filter(recording)
sorting = si.run_sorter('YYYYY', recording_filtered)
# extract waveforms
# sparse is important because make everything faster!!!
waveform_folder = '/path/for/my/waveforms'
job_kwargs = dict(n_jobs=10, chunk_duration='1s', progress_bar=True,)
we = si.extract_waveforms(
recording_filtered, sorting, waveform_folder,
max_spikes_per_unit=500,
ms_before=1.5, ms_after=2.5,
sparse=True,
**job_kwargs
)
# compute the noise level a faster opening in sigui
si.compute_noise_levels(we)
# optionally compute more stuff using the spikeinterface.postprocessing module
# principal components, template similarity, spike amplitudes
# This will enable to display more views
si.compute_principal_components(we,
n_components=3,
mode='by_channel_local',
whiten=True)
si.compute_template_similarity(we, method='cosine_similarity',
si.compute_spike_amplitudes(we, **job_kwargs)
Step 2 : open the GUI
With python:
import spikeinterface_gui
# This creates a Qt app
app = spikeinterface_gui.mkQApp()
# reload the waveform folder
we = si.WaveformExtractor.load_from_folder(waveform_folder)
# create the mainwindow and show
win = spikeinterface_gui.MainWindow(we)
win.show()
# run the main Qt6 loop
app.exec_()
With the command line
sigui /path/for/my/waveforms
Install
You need first to install one of these 3 packages (by order of preference):
pip install PySide6
pip install PyQt6
pip install PyQt5
From pypi:
pip install spikeinterface-gui
From source:
git clone https://github.com/SpikeInterface/spikeinterface-gui.git
cd spikeinterface-gui
pip install .
Author
Samuel Garcia, CNRS, Lyon, France
This work is a port of the old tridesclous.gui
submodule on top of
spikeinterface.
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
File details
Details for the file spikeinterface-gui-0.7.0.tar.gz
.
File metadata
- Download URL: spikeinterface-gui-0.7.0.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b414eeed7aee8ac6e1f005c01cb10868ed6a008cf7cf5c899321523a66b85621 |
|
MD5 | d14e8dfb3f84da6f69399dfc47061495 |
|
BLAKE2b-256 | 3e85e6531af8574ac78c4d5282a4603cb950d8e4c0798af2533cd11c1c989937 |
Provenance
File details
Details for the file spikeinterface_gui-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: spikeinterface_gui-0.7.0-py3-none-any.whl
- Upload date:
- Size: 48.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e35cbd7b121fee521f41cb4ab9dfc2de3c87825a71b8349c604ff758364e4dc3 |
|
MD5 | e60756fbc1c2e787a77bc1e98c466d82 |
|
BLAKE2b-256 | 71a1f85f05aaf82566c779dbf3734e3442adddf1f69209c155ed7865c23ab920 |