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

Potential bug in `to_ibl.py` raw data metrics PSD calculation

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
numpy, python
領域
backend, data

調査の方向性

Start with src/spikeinterface/exporters/to_ibl.py at the PSD calculation around line 219, and trace how randomly sampled LFP chunks are passed to Welch. Check the relevant exporter tests and how they validate PSD metrics. Done when the PSD is computed from consecutive samples and a regression test covers the result.

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

説明

Currently in to_ibl.py the PSD computation for LFP is computed as:

lfp_sample_data = get_random_data_chunks(
    lfp_recording,
    num_chunks_per_segment=psd_num_chunks,
    chunk_duration=f"{psd_chunk_duration_s}s",
    return_in_uV=True,
    concatenated=True,
)
psd = np.zeros((welch_win_length_samples // 2 + 1, lfp_sample_data.shape[1]), dtype=np.float32)
for i_channel in range(lfp_sample_data.shape[1]):
    freqs, Pxx = welch(
        lfp_sample_data[:, i_channel],
        fs=lfp_recording.sampling_frequency,
        nperseg=welch_win_length_samples,
    )
    psd[:, i_channel] = Pxx

Here the randomly sampled chunks of 1s (30k samples) which are concatenated then passed to Welch with chunk size 16384. This then computes the PSD with 50% overlap by default. However, this takes the PSD computation over randomly sampled chunks which are not-consecutive, giving erroneous PSD estimate.

主要言語
Python
スター
866
フォーク
285
平均マージ
2日 13時間
マージ済み PR(30日)
49

環境構築

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

はじめの一歩

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

SpikeInterface/spikeinterface のほかの issue

SpikeInterface/spikeinterface の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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