MIT-LCP / MIT-LCP/wfdb-python

Accessing a file in a subfolder on PhysioNet using pn_dir

未关闭
#467 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jupyter Notebook
星标
853
派生
322
PR 合并指标
30 天内没有已合并 PR

描述

I'm using wfdb 4.1.2, and when I try to run this code it fails with a 404:

import wfdb
record = wfdb.rdrecord('p1003/p10030753/s40735970/40735970', pn_dir='mimic-iv-ecg')

NetFileNotFoundError: 404 Error: Not Found for url: https://physionet.org/files/mimic-iv-ecg/1.0/40735970.hea

Looks like this relates to hacky path parsing which there is an open (semi-complete) PR for (#346).

I also tried:

import wfdb
record = wfdb.rdrecord('40735970', pn_dir='mimic-iv-ecg/1.0/p1003/p10030753/s40735970')

NetFileNotFoundError: 404 Error: Not Found for url: https://physionet.org/files/mimic-iv-ecg/1.0/p1003/p10030753/s40735970/40735970.hea

So I played with the path, and this ends up working:

import wfdb
record = wfdb.rdrecord('40735970', pn_dir='mimic-iv-ecg/1.0/files/p1003/p10030753/s40735970')

Seems a bit unintuitive to me that you have to put files in there, am I doing something wrong?

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 wfdb.rdrecord 开始,跟踪 PhysioNet 下载中 record 和 pn_dir 的组合方式。重现两个失败示例,然后阅读尚未完成的 PR #346,了解现有的路径解析方法。完成的标准是:嵌套的 MIMIC-IV-ECG 记录无需要求一个不直观的 files 段即可解析,并且为所示路径提供回归覆盖。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
backend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。