MIT-LCP / MIT-LCP/wfdb-python

Handling WFDB header date and time problems

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

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

Ngôn ngữ chính
Jupyter Notebook
Star
853
Fork
322
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

We should aim to prevent the creation of WFDB headers which aren't to specification (via the WFDB write functions). We should also provide clear messaging for errors related to already created WFDB headers (via he WFDB read functions).

Two sets of projects have had WFDB header issues related to base_date recently:

  1. 2020 and 2021 Challenges. These projects used -'s instead of /'s in the base_date and the date was given before the base_time: https://github.com/MIT-LCP/wfdb-python/issues/351 . As mentioned in this issue, the WFDB tools were not used to create these files, so these errorneous headers shouldn't come as a surprise.
    Error message: HeaderSyntaxError: invalid syntax in record line
  2. Cerebral projects. These projects had a year for the base_date and no time. This problem was initially noted in: https://github.com/MIT-LCP/wfdb-python/issues/307. More recently, another user sent an email about this issue.
    Error message: ValueError: time data '2006' does not match format '%d/%m/%Y' (ecg files in https://physionet.org/content/cerebral-perfusion-diabetes/1.0.0/)
    Error message: ValueError: unconverted data remains: 10 (ECG files in https://physionet.org/content/cded/1.0.0/)

It isn't clear how the WFDB files for 2. were created. There is some indication that MIT-LCP helped generate these files.

At the very least we should:

  • Use validation checks to prevent the creation of WFDB files with these issues in our WFDB toolboxes.
  • Catch these issues in all of our WFDB toolboxes and provide clear, consistent error messages.

Since we need to address multiple issues across 3 different toolboxes this issue may get messy. I will update this post to denote how updates to the Matlab and C toolboxes will be tracked once that is determined.

Finally, it would also be good if our wfdbcheck algorithm would catch these issues. This could prevent cases like those seen in the 2020, and 2021 challenges from getting through (i.e. even if a header is created outside of our toolboxes, we'd like to flag it if it isn't to specification).

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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.

Hướng nghiên cứu

Bắt đầu bằng cách lần theo các hàm ghi và đọc của WFDB xử lý base_date và base_time, sau đó kiểm tra cách wfdbcheck xử lý các header không đúng định dạng. So sánh các định dạng và lỗi không hợp lệ được liệt kê; hoàn thành khi việc validation ngăn các header không tuân theo specification và các đường dẫn đọc/kiểm tra cung cấp thông báo rõ ràng, nhất quán.

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

Đánh giá

Công nghệ
python
Lĩnh vực
data
Loại issue
Lỗi
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

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.