SpikeInterface / SpikeInterface/spikeinterface

SortingAnalyzer recording / sorting segments match

Open
#4,372 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
847
Forks
280
Avg merge
3d 9h
Merged PRs (30d)
29

Description

In earlier versions of SpikeInterface, the SortingAnalyzer's recording's and sorting's number of segments did not need to match.
For example, we were recording for several trials and having several recording files. We give the merged (concatenated cat) file to our favorite spike sorter. We get a sorting result out in global times.

Creating a SortingAnalyzer
calls
https://github.com/SpikeInterface/spikeinterface/blob/25940b471ddefbfae038aff7a7db55e5386ccd4f/src/spikeinterface/core/sortinganalyzer.py#L376

which does
https://github.com/SpikeInterface/spikeinterface/blob/25940b471ddefbfae038aff7a7db55e5386ccd4f/src/spikeinterface/curation/remove_excess_spikes.py#L30-L32

and complains for out multi-segment recordings with single-segment sorting.

I think we should treat the recording as a single recording.

The error message should mean "segments" instead of "samples".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/spikeinterface/core/sortinganalyzer.py around line 376 and follow the call into src/spikeinterface/curation/remove_excess_spikes.py at lines 30-32. Reproduce the multi-segment recording with a single-segment sorting, then verify that the recording is treated as one recording and that the error message refers to segments rather than samples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.