mirror of
https://github.com/This-weiyuqing/ECG_by_Diffenert_CNN_Test.git
synced 2026-10-17 19:05:30 +08:00
Update ECG_read_by_wfdb.py
This commit is contained in:
1 parent
e44ea0019c
commit
8d80de2fa3
1 file changed
+2
-2
@@ -5,11 +5,11 @@ import numpy as np
|
||||
def getDataset(number, X_data):
|
||||
# get ECG from mit-bih-arrhythmia-database-1.0.0
|
||||
print("get data:" + number + " ECG")
|
||||
record = wfdb.rdrecord('./mit-bih-arrhythmia-database-1.0.0/' + number, channel_names=['MLII'])
|
||||
record = wfdb.rdrecord('./MIT-BIT/' + number, channel_names=['MLII'])
|
||||
data = record.p_signal.flatten()
|
||||
|
||||
# get R sample and symbol
|
||||
annotation = wfdb.rdann('mit-bih-arrhythmia-database-1.0.0/' + number, 'atr')
|
||||
annotation = wfdb.rdann('MIT-BIT/' + number, 'atr')
|
||||
Rlocatation = annotation.sample
|
||||
Rclass = annotation.symbol
|
||||
|
||||
|
||||
Reference in new issue
Block a user