SpikeInterface / spikeinterface

A Python-based module for creating flexible and robust spike sorting pipelines.
https://spikeinterface.readthedocs.io
MIT License
524 stars 187 forks source link

extension `spike_amplitudes` is really slow with few spikes #2554

Open DradeAW opened 8 months ago

DradeAW commented 8 months ago

analyzer.compute("spike_amplitudes") is really slow (90s in my case) even when the sorting contains a single unit with two spikes.

Chunks of recording with no spikes should be skipped.

samuelgarcia commented 8 months ago

Yes I know. I will do it soon. the node piepline need some refactoring for scaling and this. pierre already worked on this but I need to refactored a bit and the main was frozen but SortingAnlyzer for long time.

note that the number of units do not impact the time but more the time to load traces from the entire file.

yger commented 8 months ago

Indeed, there is a draft of such a refactoring. Currently, the node pipeline is loading all the chunks, even if there are no peaks in it. This should and will be modified soon, but as @samuelgarcia mentionned, the big refactoring of the SortingAnalyzer perturbed everything. We will keep yo updated