修正路径

This commit is contained in:
mmmistgun 2022-03-30 09:59:40 +08:00
parent e96566b435
commit b00414d949
3 changed files with 14 additions and 6 deletions

View File

@ -22,6 +22,14 @@ Quality_Relabel 主目录
670 [测试数据集](https://kod.server.marques22.com/#s/799gDeDw)
## 注意事项
![](graph/note.png)
## 程序流程框图
![流程框图](graph/Quality_Relabel.svg)

BIN
graph/note.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -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} 不存在!")