Better API for specifying return data of signals
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 853
- Fork
- 322
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Trước tiên, hãy đọc wfdb/io/record.py quanh dòng 1715 và phần thảo luận của pull request được liên kết, vì các tham số được đề xuất và những câu hỏi về tính tương thích vẫn đang được thảo luận. Công việc được xem là hoàn tất khi xác lập và ghi lại các dạng giá trị trả về cho tín hiệu đơn tần và đa tần qua return_dims và smooth_frames, đồng thời xử lý nhất quán tổ hợp không hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- numpy, python
- Lĩnh vực
- backend-api-design, data
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100