diff --git a/README.md b/README.md index eb8c85d..bf6b875 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ Quality_Relabel 主目录 670 [测试数据集](https://kod.server.marques22.com/#s/799gDeDw) + + + + +## 注意事项 + +![](graph/note.png) + ## 程序流程框图 ![流程框图](graph/Quality_Relabel.svg) diff --git a/graph/note.png b/graph/note.png new file mode 100644 index 0000000..2a45ea9 Binary files /dev/null and b/graph/note.png differ diff --git a/utils/Quality_Relabel.py b/utils/Quality_Relabel.py index 7e414aa..cefe514 100644 --- a/utils/Quality_Relabel.py +++ b/utils/Quality_Relabel.py @@ -15,7 +15,7 @@ from pathlib import Path import numpy as np import pandas as pd from matplotlib import pyplot as plt, gridspec -from Preprocessing import BCG_Operation +from utils.Preprocessing import BCG_Operation from tqdm import tqdm from datetime import datetime @@ -33,7 +33,7 @@ plt.rcParams['axes.unicode_minus'] = False # logger = logging.getLogger() logger.setLevel(logging.NOTSET) realtime = time.strftime('%Y%m%d', time.localtime(time.time())) -fh = logging.FileHandler(Path("../history") / (realtime + ".log"), mode='a') +fh = logging.FileHandler(Path("history") / (realtime + ".log"), mode='a') fh.setLevel(logging.NOTSET) fh.setFormatter(logging.Formatter("%(asctime)s: %(message)s")) logger.addHandler(fh) @@ -112,8 +112,8 @@ class Quality_Relabel: print(f"ͨ{self.channel_list}") def read_data(self, frequency: int = 100, bcg_frequency: int = 1000): - bcg_path = Path(f"../Data/BCG/{self.sampNo}samp.npy") - ecg_path = Path(f"../Data/ECG/A{str(self.sampNo).rjust(7, '0')}.edf") + bcg_path = Path(f"Data/BCG/{self.sampNo}samp.npy") + ecg_path = Path(f"Data/ECG/A{str(self.sampNo).rjust(7, '0')}.edf") if not bcg_path.exists(): logging.error(f"{bcg_path} ڣ") @@ -178,8 +178,8 @@ class Quality_Relabel: self.signal_select['xin_xiao_respire'] = signal2 def read_event(self): - bcg_label_path = Path(f"../Data/BCG_label/{self.sampNo}_label_all.csv") - ecg_label_path = Path(f"../Data/ECG_label/export{self.sampNo}.csv") + bcg_label_path = Path(f"Data/BCG_label/{self.sampNo}_label_all.csv") + ecg_label_path = Path(f"Data/ECG_label/export{self.sampNo}.csv") if not bcg_label_path.exists(): logging.error(f"{bcg_label_path} ڣ")