
MIMIC重症监护病房python中wfdb包的使用
发布日期:2021-05-07 16:45:30
浏览次数:23
分类:技术文章
本文共 672 字,大约阅读时间需要 2 分钟。
1.查看所有数据库
import wfdbdbs = wfdb.get_dbs()print(dbs)
2.获取数据库中的所有记录
import wfdbrecs_list = wfdb.get_record_list('wrist')print(recs_list)
3.读取某一列数据,并到放到csv文件中
import wfdbimport matplotlib.pyplot as pltimport numpy as npchest_ecg, wrist_ppg = wfdb.rdsamp('../wrist/s1_high_resistance_bike', channels=[0, 1], sampfrom=0, sampto=15000)print('chest_ecg:', chest_ecg)np.savetxt("temp.csv", chest_ecg, delimiter=",")print('wrist_ppg:', wrist_ppg)plt.plot(chest_ecg)plt.ylabel(wrist_ppg['units'][0])plt.legend([wrist_ppg['sig_name'][0], wrist_ppg['sig_name'][1]])plt.show()
附:参考文章
https://blog.csdn.net/weixin_44191286/article/details/86305591 https://www.jianshu.com/p/4e3a3bd49dc8发表评论
最新留言
第一次来,支持一个
[***.219.124.196]2025年03月21日 16时49分42秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!