spyke is a Python application for visualizing, navigating, and spike sorting high-density multichannel extracellular neuronal waveform data.
spyke currently works with .dat
files, Blackrock .nsx
files, Swindale
Lab .srf
and .tsf
files, and Rodrigo Quian Quiroga's
simulated data .mat
files.
spyke can be extended to work with other electrophysiology file formats. Some sample
data is available. Spike sorting for polytrodes: a divide
and conquer approach is a paper describing the
overall approach. spyke is described in greater detail in Chapter 3 and Appendix C.2 of this
thesis.
A much older version is described in the paper Python for large-scale electrophysiology.
Some functionality was inherited from Tim Blanche's Delphi program "SurfBawd". Some icons were copied from Ubuntu's Humanity icon theme.
spyke requires recent versions of the following to be installed:
- Python (2.7.x, not quite yet compatible with 3.x)
- IPython
- numpy 1.13
- scipy
- matplotlib
- PyQt4 (PySide will probably work too, but is untested)
- PyOpenGL
- Cython
- MDP
- scikit-learn
- PyWavelets
spyke is developed in Xubuntu 16.04. It should work in other Linux distributions, and is known to work in OSX. In principle, it should also work in Windows.
Most often, you'll want to install spyke in-place in "development mode", allowing you to launch it or import it from any path on your system, while still being able to update from git or work on the code wherever you cloned it:
$ sudo python setup.py develop
This also installs a startup script in your system path that allows you to launch spyke from anywhere on your system by simply typing:
$ spyke
Alternatively, you can launch spyke with:
$ python -m spyke.main
which gives you some more flexibility, such as allowing you to specify what version of Python you want to use.
Instead of development mode, you can also install by copying the code to your system Python installation:
$ sudo python setup.py install
However, unlike in developer mode, every time you update from git, you'll have to re-run the above installation command.
Plotting of spike waveforms in the Sort window can be slow and generate flicker. This seems to be a problem with matplotlib, and can be fixed by applying the following diff to matplotlib:
diff --git a/lib/matplotlib/backends/backend_qt5agg.py b/lib/matplotlib/backends/backend_qt5agg.py
index 5b8e111..55fdb4f 100644
@@ -165,3 +165,3 @@ class FigureCanvasQTAggBase(object):
t = b + h
- self.repaint(l, self.renderer.height-t, w, h)
+ self.update(l, self.renderer.height-t, w, h)
See TUTORIAL.md for a fairly brief tutorial.
Many keyboard shortcuts are available. Tooltips give some hints. You can also discover them by
searching for keyPressEvent
methods in the code.