This commit is contained in:
weiyuqing committed 2023-05-16 11:17:44 +08:00
commit d5a44029c7
1 file changed
+2 -2
+2 -2
View File
@@ -5,11 +5,11 @@ import numpy as np
def getDataset(number, X_data): def getDataset(number, X_data):
# get ECG from mit-bih-arrhythmia-database-1.0.0 # get ECG from mit-bih-arrhythmia-database-1.0.0
print("get data:" + number + " ECG") 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() data = record.p_signal.flatten()
# get R sample and symbol # 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 Rlocatation = annotation.sample
Rclass = annotation.symbol Rclass = annotation.symbol