Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Iterative Isosplit doesn't work with SpykingCircus2

オープン
#4,604 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python

調査の方向性

Start in spikeinterface/sorters/internal/spyking_circus2.py at _run_from_folder, then inspect find_clusters_from_peaks, get_templates_from_peaks_and_recording, and get_templates_from_peaks_and_svd. Reproduce the iterative-isosplit path with SpykingCircus2 and compare the returned values. Done means the sorting run completes without the reported UnboundLocalError.

索引モデルが issue の本文から書いたものです。

説明

sorters

I'm experimenting with clustering params and methods to reduce the number of contaminated units in my data, and I tried using iterative-isosplit instead of iterative-hdbscan with SC2 to see if results were noticeably different.

Here's the trace :

Traceback (most recent call last):
  File "/home/user/Documents/ephy/pipelines/spike_sorting.py", line 253, in <module>
    run_spike_sorting(path, sorter, preprocessing, sorter_params, extensions=True)
  File "/home/user/Documents/ephy/pipelines/spike_sorting.py", line 86, in run_spike_sorting
    sorting = ss.run_sorter(
              ^^^^^^^^^^^^^^
  File "/home/user/Documents/GitHub/spikeinterface/src/spikeinterface/sorters/runsorter.py", line 206, in run_sorter
    return run_sorter_local(**common_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Documents/GitHub/spikeinterface/src/spikeinterface/sorters/runsorter.py", line 298, in run_sorter_local
    SorterClass.run_from_folder(folder, raise_error, verbose)
  File "/home/user/Documents/GitHub/spikeinterface/src/spikeinterface/sorters/basesorter.py", line 306, in run_from_folder
    raise SpikeSortingError(
spikeinterface.sorters.utils.misc.SpikeSortingError: Spike sorting error trace:
Traceback (most recent call last):
  File "/home/user/Documents/GitHub/spikeinterface/src/spikeinterface/sorters/basesorter.py", line 266, in run_from_folder
    SorterClass._run_from_folder(sorter_output_folder, sorter_params, verbose)
  File "/home/user/Documents/GitHub/spikeinterface/src/spikeinterface/sorters/internal/spyking_circus2.py", line 408, in _run_from_folder
    cleaning_kwargs["max_std_per_channel"] = max_std_per_channel
                                             ^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'max_std_per_channel' where it is not associated with a value

Spike sorting failed. You can inspect the runtime trace in /home/user/HDMEA_Data/To_be_analyzed/2085/20260602_133942_spykingcircus2_260126-2085-06_03_raw_00/spykingcircus2_output/spikeinterface_log.json.

From a quick look, it seems that find_clusters_from_peaks returns a dict in more_outs with templates and time_shifts as keys, but nothing SVD-related. This sets clustering_from_svd as False, and thus templates are obtained from get_templates_from_peaks_and_recording and not get_templates_from_peaks_and_svd. The latter also returns max_std_per_channel, but the former doesn't, which results in a crash at cleaning_kwargs["max_std_per_channel"] = max_std_per_channel.

主要言語
Python
スター
859
フォーク
286
平均マージ
3日 16時間
マージ済み PR(30日)
52

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SpikeInterface/spikeinterface のほかの issue

SpikeInterface/spikeinterface の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。