btel / SpikeSort

Spike sorting library implemented in Python/NumPy/PyTables
http://spike-sort.readthedocs.org
Other
27 stars 12 forks source link

plotting spikes takes very long #14

Open btel opened 12 years ago

btel commented 12 years ago

plotting large number of spikes >10000 by PlotSpikes component takes a couple of seconds and significantly affects spike sorting experience

btel commented 12 years ago

The problem was investigated and it turns out that it lies in the c library used by matplotlib for plotting: AGG that applies antialiasing and complex path rendering (like bezier curves). We plan to use an alternative plotting package optimised for plotting large dataset.

Benchmark of popular graphical libraries

I performed tests of different plotting frameworks: matplotlib, pygames (based on sdl), opengl (using pyopengl bindings), python image library and html5 canvas. The task was to plot 50000 lines, 34 points long each (for some benchmarks points were uniformly distributed, while for others they were sines, which is not completely fair). Link to files: https://gist.github.com/1716954

belevtsoff commented 12 years ago

I've created an "opengl_plotting" branch

cpcloud commented 12 years ago

Have you thought about using glumpy?

belevtsoff commented 12 years ago

@cpcloud yeah, that's what we're planning to use. The problem, however, is that most of the glumpy's functionality is dedicated for plotting large 2D data arrays, whereas we are interested in plotting lines. So the only feature we need from glumpy is it's ability to create nice forms with subplots using GLUT. So here's a tradeoff:

glumpy:

pure PyOpenGL:

So I was thinking that we probably could just take what we need from glumpy and incorporate that in SpikeSort. I'm not sure about the licensing stuff though...

Any other ideas?