Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#4,891 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
numpy, python
Lĩnh vực
backend, data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
866
Fork
285
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
47

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SpikeInterface/spikeinterface

Tất cả issue của SpikeInterface/spikeinterface

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.