1、修复了<呼吸可用性及间期标注>中若THO峰值数据的历史存档为空,则无法正确打开数据文件的问题
2、修复了<呼吸可用性及间期标注>中点击标注后UI信息未更新的问题
This commit is contained in:
@ -12,6 +12,7 @@ from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg
|
||||
from numpy import array, full, int64, append, zeros, where, arange, float64, nan, place, delete, setdiff1d
|
||||
from overrides import overrides
|
||||
from pandas import read_csv, DataFrame
|
||||
from pandas.errors import EmptyDataError
|
||||
from scipy.signal import find_peaks, resample
|
||||
from yaml import dump, load, FullLoader
|
||||
|
||||
@ -1016,6 +1017,7 @@ class MainWindow_resp_quality_label(QMainWindow):
|
||||
Constants.TIPS_TYPE_INFO)
|
||||
result = self.data.save_resp_quality_label()
|
||||
self.update_tableWidget()
|
||||
self.update_info()
|
||||
if not result.status:
|
||||
PublicFunc.text_output(self.ui, result.info, Constants.TIPS_TYPE_ERROR)
|
||||
PublicFunc.msgbox_output(self, result.info, Constants.MSGBOX_TYPE_ERROR)
|
||||
@ -1559,6 +1561,7 @@ class Data():
|
||||
return Result().success(info=Filename.RESP_QUALITY_LABEL + ":" + Constants.ARCHIVE_EXIST)
|
||||
|
||||
def get_archive_tho_peak(self):
|
||||
try:
|
||||
if not Path(Config["Path"]["Save_Tho_peak"]).exists():
|
||||
self.Tho_peak = array([]).astype(int)
|
||||
self.Tho_peak_y = array([]).astype(int)
|
||||
@ -1569,6 +1572,10 @@ class Data():
|
||||
header=None).to_numpy().reshape(-1)
|
||||
|
||||
return Result().success(info=Filename.THO_PEAK + ":" + Constants.ARCHIVE_EXIST)
|
||||
except EmptyDataError as e:
|
||||
self.Tho_peak = array([]).astype(int)
|
||||
self.Tho_peak_y = array([]).astype(int)
|
||||
return Result().success(info=Filename.RESP_QUALITY_LABEL + ":" + Constants.ARCHIVE_EMPTY)
|
||||
|
||||
def resample_tho_and_OrgBCG(self):
|
||||
if (self.OrgBCG is None) or (self.Tho is None):
|
||||
|
||||
@ -33,6 +33,7 @@ class Constants:
|
||||
LOADING_ARCHIVE: str = "正在获取历史存档"
|
||||
ARCHIVE_EXIST: str = "找到历史存档,成功读取"
|
||||
ARCHIVE_NOT_EXIST: str = "未找到历史存档,创建新存档"
|
||||
ARCHIVE_EMPTY: str = "历史存档为空,创建新存档"
|
||||
|
||||
DRAWING_DATA: str = "正在绘制图形"
|
||||
DRAW_FINISHED: str = "绘制完成"
|
||||
|
||||
Reference in New Issue
Block a user