ann2rr filters intervals by length instead of by time in the record
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #622 @TheNetherWatcher による — マージ済み
評価
調査の方向性
The ann2rr function lives in wfdb/processing.py; start by reading its docstring and the filtering lines shown. Compute each interval's end time as cumulative sum of RR intervals from start_time, then keep those between bounds. Done means ann2rr('sample-data/100','atr', start_time=0.9) returns intervals after 0.9s, and tests pass.
索引モデルが issue の本文から書いたものです。
説明
The ann2rr docstring describes start_time and stop_time as "the time to start the intervals" and "the time to stop the intervals", in seconds. But they're compared with the length of each interval, not with its position in the record:
time_interval = rr_interval / ann.fs
if start_time is not None:
time_interval = time_interval[(time_interval > start_time).astype(bool)]
if stop_time is not None:
time_interval = time_interval[(time_interval < stop_time).astype(bool)]
For example, with record 100 (360 Hz):
from wfdb import processing
len(processing.ann2rr("sample-data/100", "atr")) # 2274
processing.ann2rr("sample-data/100", "atr", start_time=0.9) # 30 intervals, all longer than 0.9 s
processing.ann2rr("sample-data/100", "atr", stop_time=0.5) # 2 intervals, both shorter than 0.5 s
So start_time=0.9 drops every interval shorter than 0.9 s, rather than the intervals before 0.9 s into the record.
The WFDB ann2rr program's -f and -t options select annotations by time in the record. ann2rr should probably do the same: keep the intervals that end between start_time and stop_time, measuring the first interval from start_time, as ann2rr -f does.
This is separate from #584, which changes which annotations are used but leaves this filtering unchanged.
- 主要言語
- Jupyter Notebook
- スター
- 856
- フォーク
- 326
- 平均マージ
- 22時間 46分
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MIT-LCP/wfdb-python のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
MIT-LCP/wfdb-python#590 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
MIT-LCP/wfdb-python#568 ·
メンテナーはふだん 1 日以内に返信
-
Add validation of segments when writing a `MultiRecord`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
MIT-LCP/wfdb-python#557 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
MIT-LCP/wfdb-python#554 ·
メンテナーはふだん 1 日以内に返信
-
WFDB path ignoredオープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
MIT-LCP/wfdb-python#545 ·
メンテナーはふだん 1 日以内に返信
MIT-LCP/wfdb-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
andreagrandi/draftomen#1058 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
osmlab/name-suggestion-index#13056 ·
メンテナーはふだん 2 日以内に返信
-
feed submission
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MobilityData/mobility-database-catalogs#1787 ·
メンテナーはふだん 2 日以内に返信
-
dev ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
truera/trulens#3051 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信