MIT-LCP / MIT-LCP/wfdb-python

Better API for specifying return data of signals

オープン
#376 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Jupyter Notebook
スター
853
フォーク
322
PR マージ指標
30日以内にマージされた PR はありません

説明

The current rdrecord API is rather confusing when dealing with more complex records/signals. Namely: multi-frequency signals.

We should create a better API to allow users to:

  • Specify/know the exact return types/dimensions of the signals being read
  • Deal with single and multi-frequency records consistently.

In addition, the current API is also limiting when reading single-frequency records, as there is no way for users to explicitly specify whether they want 1d or 2d numpy arrays.

We current have: https://github.com/MIT-LCP/wfdb-python/blob/0d42dfb4b2946625f00cbf500d830d374a201153/wfdb/io/record.py#L1715 where the only parameter that influences the return type is: smooth_frames

We've chatted about the issue here, where I suggested a new set of params:
https://github.com/MIT-LCP/wfdb-python/pull/313#issuecomment-1058363761

What do people think of the suggestion of having two params: return_dims and smooth_frames? return_dims will apply for both single and multi-frequency signals, and smooth_frames will apply only to multi-frequency signals. Given the combination of the params, the return value of the signals will be:

(1, True): List of 1d arrays. Guaranteed to be same length.
(1, False): List of 1d arrays. Not guaranteed to be same length for multi-frequency signals.
(2, True): Single 2d array.
(2, False): Illegal combination.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提案されているパラメータと互換性に関する問題はまだ議論中であるため、まず wfdb/io/record.py の1715行付近と、リンクされている pull request の議論を確認してください。完了条件は、return_dims と smooth_frames における単一周波数および複数周波数の信号の返却形式を確立して文書化し、不正な組み合わせを一貫して処理することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
numpy, python
領域
backend-api-design, data
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。