One malformed signal in mimic3 matched?
还没有人认领这个 Issue。
评估
调研方向
首先使用 wfdb.rdrecord 复现 p086831-2130-12-29-18-28n 的示例,分别从在线数据库以及本地的 .hea 和 .dat 文件读取。检查 wfdb/io/_signal.py 中 _check_sig_dims 附近的代码,并将声明的采样维度与加载的数据进行比较。完成的标准是确定不匹配源自 wfdb 还是 MIMIC 文件,并记录证据。
由索引模型根据 Issue 内容生成。
描述
Hi,
I've been using wfdb-python to parse numerics from the mimic3 waveforms database at large. I've found just one file that appears to be unreadable by wfdb, from patient p086831. Here's a minimum example (pulling from the online database):
import wfdb
rec_id = "p086831-2130-12-29-18-28n"
# rec_path = "mimic3wdb/1.0/matched/p08/p086831/"
rec_path = "mimic3wdb-matched/1.0/p08/p086831/"
rec = wfdb.rdrecord(rec_id, pn_dir=rec_path)
ValueError Traceback (most recent call last)
Cell In[6], line 6
4 # rec_path = "mimic3wdb/1.0/matched/p08/p086831/"
5 rec_path = "mimic3wdb-matched/1.0/p08/p086831/"
----> 6 rec = wfdb.rdrecord(rec_id, pn_dir=rec_path)
...
File .../venv/lib/python3.11/site-packages/wfdb/io/_signal.py:2051, in _check_sig_dims(sig, read_len, n_sig, samps_per_frame)
2049 for ch in range(n_sig):
2050 if len(sig[ch]) != samps_per_frame[ch] * read_len:
-> 2051 raise ValueError("Samples were not loaded correctly")
ValueError: Samples were not loaded correctly
This also occurs when pulling the respective .hea and .dat files locally and using wfdb from there.
Perhaps this is an issue with the MIMIC file itself, but I wanted to start here, since I'm not sure how to tell. Might this be a MIMIC bug, or is this a wfdb issue?
Thanks in advance--
- 主要语言
- Jupyter Notebook
- 星标
- 853
- 派生
- 322
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MIT-LCP/wfdb-python 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
MIT-LCP/wfdb-python#568 ·
-
难度 3/5 1-2 天 新手友好度 48/100
MIT-LCP/wfdb-python#557 ·
-
难度 2/5 1-3 小时 新手友好度 58/100
MIT-LCP/wfdb-python#554 ·
-
难度 4/5 3-5 天 新手友好度 35/100
MIT-LCP/wfdb-python#545 ·
-
难度 5/5 一周以上 新手友好度 30/100
MIT-LCP/wfdb-python#540 ·
查看 MIT-LCP/wfdb-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
Schema-level dtype cannot be serialized: to_yaml raises RepresenterError, to_json raises TypeError 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
unionai-oss/pandera#2511 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
unitaryfoundation/qldpc-challenge#1651 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
statsmodels/statsmodels#10271 ·