csv_to_wfdb mishandles defaults, scalar broadcasting and checksums
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Read src/wfdb/io/convert/csv.py, especially the csv_to_wfdb section around lines 338–409, and review the related work in issue #592. Check how defaults, scalar broadcasting, checksums, and initial values behave with the examples in this issue, including record_only=True. Done means those cases use the intended values and the relevant tests pass.
由索引模型根據 Issue 內容生成。
描述
Found while reviewing #591.
The code in csv_to_wfdb that fills in defaults and broadcasts scalars to all channels (https://github.com/MIT-LCP/wfdb-python/blob/b8914e1c9c777c45571c894cb7b6579550a86f13/src/wfdb/io/convert/csv.py#L338-L409) has several problems:
- Scalars are only broadcast when
type(x) is int(orstr). NumPy integers and floats such asadc_gain=200.5are not broadcast to a list. - Defaults are applied with
if not x:, so an explicit0is treated as missing. For example,baseline=0withadc_zero=1024gives a baseline of 1024. - When
adc_zerois a list andbaselineis not given, the default baseline becomes[adc_zero] * n_sig, a list of lists (https://github.com/MIT-LCP/wfdb-python/blob/b8914e1c9c777c45571c894cb7b6579550a86f13/src/wfdb/io/convert/csv.py#L355-L357). - With
record_only=True, the defaultchecksumis computed from the physical values rather than the digital samples (https://github.com/MIT-LCP/wfdb-python/blob/b8914e1c9c777c45571c894cb7b6579550a86f13/src/wfdb/io/convert/csv.py#L401-L402), andinit_valueis an approximation frombaseline + adc_gain * p_signal[0](https://github.com/MIT-LCP/wfdb-python/blob/b8914e1c9c777c45571c894cb7b6579550a86f13/src/wfdb/io/convert/csv.py#L393-L396).
The checksum and initial value could be computed from the digital signal (e.g. via Record.adc()) instead. This may be easiest to address together with #592.
- 主要語言
- Jupyter Notebook
- 星號
- 853
- 分支
- 324
- 平均合併
- 17 小時 39 分鐘
- 30 天內合併 PR
- 10
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
MIT-LCP/wfdb-python 的其他 Issue
-
難度 1/5 1-3 小時 新手友好度 83/100
MIT-LCP/wfdb-python#594 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 72/100
MIT-LCP/wfdb-python#590 ·
維護者通常 1 天內回覆
-
pandas 3.0: three remaining set_index(<str column>.values) calls still raise TypeError (custom-labels paths)可能已有人在做 @wenh06 於 6 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
MIT-LCP/wfdb-python#574 · 1 則留言 ·
維護者通常 1 天內回覆
-
`find_local_peaks` ignores the sample at `i + radius`, so points on a rising slope are returned as peaks可能已有人在做 @rmz-oz 於 28 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 84/100
MIT-LCP/wfdb-python#572 ·
維護者通常 1 天內回覆
-
bug
難度 3/5 1-2 天 新手友好度 72/100
MIT-LCP/wfdb-python#595 ·
維護者通常 1 天內回覆
查看 MIT-LCP/wfdb-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
NaiboWang/EasySpider#1007 ·
-
check:passed logos:remove
難度 1/5 1 小時以內 新手友好度 65/100
維護者通常 4 天內回覆
-
fix(nlp): match single-letter bullets in the enumerated bullet pattern可能已有人在做 @Eapp1e 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
Unstructured-IO/unstructured#4635 ·
維護者通常 1 天內回覆