Allow overwriting incorrect units in EDF header with mne.io.read_raw_edf

Đang mở
#14,427 2 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
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api, data

Hướng nghiên cứu

Start with the units handling in mne/io/edf/edf.py, especially the check near line 494 that rejects replacing units already specified in the EDF header. Trace the existing mne.io.read_raw_edf tests for unit overrides and add coverage for replacing a specified unit; done means an incorrect header unit can be overridden and the resulting data can be exported to EDF.

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

Mô tả

ENH
Describe the new feature or enhancement

An EDF file I have has some channels that are in arbitrary units (i.e. misc channels) but the header incorrectly specifies uV. There appears to be no easy way to fix this in MNE directly: I'll need to correct the header externally.

This causes downstream issues when exporting to EDF because the range now has too many characters to fit in an EDF header field (edfio gives up).

Describe your proposed implementation

Would it be possible to update the units parameter of mne.io.read_raw_edf to allow over-writing an existing unit? Currently, this raises an error: only units that are unspecified in the EDF header are allowed to be modified on opening them.

Describe possible alternatives

Using an external tool to fix the header. This is annoying because I expected this to be possible with just MNE.

Additional context

No response

Ngôn ngữ chính
Python
Star
3.6k
Fork
1.6k
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
73

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

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 mne-tools/mne-python

Tất cả issue của mne-tools/mne-python

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.