One malformed signal in mimic3 matched?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the example with wfdb.rdrecord for p086831-2130-12-29-18-28n, both from the online database and from the local .hea and .dat files. Inspect wfdb/io/_signal.py around _check_sig_dims and compare the declared sample dimensions with the loaded data. Done means determining whether the mismatch originates in wfdb or the MIMIC file and recording the evidence.
Written by the indexing model from the issue text.
Description
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--
- Dominant language
- Jupyter Notebook
- Stars
- 853
- Forks
- 322
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MIT-LCP/wfdb-python
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
MIT-LCP/wfdb-python#568 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
MIT-LCP/wfdb-python#557 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
MIT-LCP/wfdb-python#554 ·
-
WFDB path ignored Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MIT-LCP/wfdb-python#545 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
MIT-LCP/wfdb-python#540 ·
All issues in MIT-LCP/wfdb-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Schema-level dtype cannot be serialized: to_yaml raises RepresenterError, to_json raises TypeError Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
unionai-oss/pandera#2511 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
unitaryfoundation/qldpc-challenge#1651 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
statsmodels/statsmodels#10271 ·