`BenchmarkStudy.create` reuses the main channels of another dataset
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in benchmark/benchmark_base.py at BenchmarkStudy.create and trace how main_channel_indices is set before it is passed to create_sorting_analyzer. The issue provides a reproduction using SorterStudy.create with one dataset missing gt_unit_locations; first run that example and inspect the analyzer channel indices. Done when each dataset gets appropriate main channels and a regression test covers the missing-property case.
Written by the indexing model from the issue text.
Description
I found this while reading benchmark/benchmark_base.py, not in my own analyses, so this is a "for the sake of improvement" report.
In BenchmarkStudy.create, main_channel_indices is only set when the ground truth sorting has the gt_unit_locations property, but it is always passed to create_sorting_analyzer (since #4734). A dataset without this property gets the main channels of the previous dataset, or an UnboundLocalError if it is the first one. The sparsity, templates and SNR are then wrong without an error.
import tempfile
from pathlib import Path
from spikeinterface.core import generate_ground_truth_recording
from spikeinterface.benchmark import SorterStudy
if __name__ == "__main__":
datasets = {}
for key, seed in (("a", 0), ("b", 5)):
datasets[key] = generate_ground_truth_recording(num_channels=32, num_units=4, durations=[10.0], seed=seed)
datasets["b"][1].delete_property("gt_unit_locations")
cases = {key: {"label": key, "dataset": key, "params": {"sorter_name": "simple"}} for key in datasets}
study = SorterStudy.create(Path(tempfile.mkdtemp()) / "study", datasets=datasets, cases=cases)
print(study.analyzers["a"].main_channel_indices, study.analyzers["b"].main_channel_indices)
Both datasets get the same main channels. Fix: set main_channel_indices = None in the else branch, so that they are estimated. I have this locally with a test. Should I open a PR, or would you rather fix it yourselves?
- Dominant language
- Python
- Stars
- 883
- Forks
- 291
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 40
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SpikeInterface/spikeinterface
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
SpikeInterface/spikeinterface#5008 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
SpikeInterface/spikeinterface#5007 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
SpikeInterface/spikeinterface#5006 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
SpikeInterface/spikeinterface#5005 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SpikeInterface/spikeinterface#5004 ·
Maintainers usually reply within 2 days
All issues in SpikeInterface/spikeinterface
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
available bug good first issue tooling
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Nixitov/Riptide-Native#816 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
teng-lin/notebooklm-py#2593 ·
Maintainers usually reply within 1 day
-
claimed-by:collie role:small-fix status:running
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Beovulfo/herd-sdlc#325 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 94/100
omarelshamy25x/shamy-arabic-nlp#267 ·
Maintainers usually reply within 1 day