Handling WFDB header date and time problems
还没有人认领这个 Issue。
- 主要语言
- Jupyter Notebook
- 星标
- 853
- 派生
- 322
- PR 合并指标
- 30 天内没有已合并 PR
描述
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:
- 2020 and 2021 Challenges. These projects used -'s instead of /'s in the
base_dateand the date was given before thebase_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 - Cerebral projects. These projects had a year for the
base_dateand 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).
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪处理 base_date 和 base_time 的 WFDB 写入和读取函数,然后检查 wfdbcheck 如何处理格式错误的 header。比较列出的无效格式和错误;完成的标准是验证能够阻止不符合规范的 header,并且读取/检查路径提供清晰、一致的消息。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100