wfdb使用说明

rdrecord的使用:
import matplotlib.pyplot as plt
import wfdb

record = wfdb.rdrecord('sample-data/a103l')
plt.plot(record.p_signal[0: 500, 0])
plt.plot(record.p_signal[500: 1000, 1])
plt.plot(record.p_signal[49500: 50000, 2])
plt.show()

在这里插入图片描述

rdsamp的使用:
from IPython.display import display
import matplotlib.pyplot as plt
import numpy as np
import os
import shutil

import wfdb

# Demo 2 - Read certain channels and sections of the WFDB record using the simplified 'rdsamp' function
# which returns a numpy array and a dictionary. Show the data.
signals, fields = wfdb.rdsamp('sample-data/s0010_re', channels=[14, 0, 5, 10], sampfrom=100, sampto=15000)
display(signals)
display(fields)

运行结果如下:

[[ 0.0335 -0.167  -0.237   0.1165]
 [ 0.0355 -0.1615 -0.2395  0.119 ]
 [ 0.0385 -0.168  -0.2465  0.116 ]
 ...
 [-0.0445  0.008   0.033   0.045 ]
 [-0.044   0.0175  0.042   0.052 ]
 [-0.044   0.0245  0.0365  0.05  ]]
{'comments': ['age: 81', 'sex: female', 'ECG date: 01/10/1990', 'Diagnose:', 'Reason for admission: Myocardial infarction', 'Acute infarction (localization): infero-latera', 'Former infarction (localization): no', 'Additional diagnoses: Diabetes mellitus', 'Smoker: no', 'Number of coronary vessels involved: 1', 'Infarction date (acute): 29-Sep-90', 'Previous infarction (1) date: n/a', 'Previous infarction (2) date: n/a', 'Hemodynamics:', 'Catheterization date: 16-Oct-90', 'Ventriculography: Akinesia inferior wall', 'Chest X-ray: Heart size upper limit of norm', 'Peripheral blood Pressure (syst/diast):  140/80 mmHg', 'Pulmonary artery pressure (at rest) (syst/diast): n/a', 'Pulmonary artery pressure (at rest) (mean): n/a', 'Pulmonary capillary wedge pressure (at rest): n/a', 'Cardiac output (at rest): n/a', 'Cardiac index (at rest): n/a', 'Stroke volume index (at rest): n/a', 'Pulmonary artery pressure (laod) (syst/diast): n/a', 'Pulmonary artery pressure (laod) (mean): n/a', 'Pulmonary capillary wedge pressure (load): n/a', 'Cardiac output (load): n/a', 'Cardiac index (load): n/a', 'Stroke volume index (load): n/a', 'Aorta (at rest) (syst/diast): 160/64 cmH2O', 'Aorta (at rest) mean: 106 cmH2O', 'Left ventricular enddiastoli
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值