移除冗余的提示信息输出,优化代码结构
This commit is contained in:
@ -1027,16 +1027,7 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
Config["IV_Coordinate"]["ECG_front_2"] = self.ui.spinBox_ECG_front_RRIV_2.value()
|
||||
Config["Coordinate"]["ECG_front_2"] = self.data.Rpeak[:-2][self.ui.spinBox_ECG_front_RRIV_2.value()]
|
||||
self.ui.spinBox_ECG_front_Signal_2.setValue(Config["Coordinate"]["ECG_front_2"])
|
||||
PublicFunc.text_output(
|
||||
self.ui, Constants.CORRESPONDING_INTERVAL_PROMOTE_TEMPLATE.format(
|
||||
Config["Coordinate"]["ECG_front_1"],
|
||||
Config["Coordinate"]["ECG_front_2"],
|
||||
self.data.get_corresponding_interval(Config["Coordinate"]["ECG_front_1"], bcg2ecg=False).data[
|
||||
"new_point"],
|
||||
self.data.get_corresponding_interval(Config["Coordinate"]["ECG_front_2"], bcg2ecg=False).data[
|
||||
"new_point"],
|
||||
), Constants.TIPS_TYPE_INFO
|
||||
)
|
||||
|
||||
|
||||
elif sender == self.ui.spinBox_ECG_back_RRIV_1:
|
||||
if self.ui.spinBox_ECG_back_RRIV_1.value() >= len(self.data.Rpeak[:-2]):
|
||||
@ -1050,17 +1041,7 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
Config["IV_Coordinate"]["ECG_back_2"] = self.ui.spinBox_ECG_back_RRIV_2.value()
|
||||
Config["Coordinate"]["ECG_back_2"] = self.data.Rpeak[:-2][self.ui.spinBox_ECG_back_RRIV_2.value()]
|
||||
self.ui.spinBox_ECG_back_Signal_2.setValue(Config["Coordinate"]["ECG_back_2"])
|
||||
PublicFunc.text_output(
|
||||
self.ui, Constants.CORRESPONDING_INTERVAL_PROMOTE_TEMPLATE.format(
|
||||
Config["Coordinate"]["ECG_back_1"],
|
||||
Config["Coordinate"]["ECG_back_2"],
|
||||
self.data.get_corresponding_interval(Config["Coordinate"]["ECG_back_1"], bcg2ecg=False).data[
|
||||
"new_point"],
|
||||
|
||||
self.data.get_corresponding_interval(Config["Coordinate"]["ECG_back_2"], bcg2ecg=False).data[
|
||||
"new_point"],
|
||||
), Constants.TIPS_TYPE_INFO
|
||||
)
|
||||
except AttributeError as e:
|
||||
print(e)
|
||||
pass
|
||||
@ -1386,33 +1367,13 @@ class MainWindow_precisely_align(QMainWindow):
|
||||
Config["IV_Coordinate"]["ECG_front_2"] = indices[-1]
|
||||
Config["Coordinate"]["ECG_front_1"] = self.data.Rpeak[:-2][indices[0]]
|
||||
Config["Coordinate"]["ECG_front_2"] = self.data.Rpeak[:-2][indices[-1]]
|
||||
PublicFunc.text_output(
|
||||
self.ui,
|
||||
Constants.CORRESPONDING_INTERVAL_PROMOTE_TEMPLATE.format(
|
||||
Config["Coordinate"]["ECG_front_1"],
|
||||
Config["Coordinate"]["ECG_front_2"],
|
||||
self.data.get_corresponding_interval(
|
||||
Config["Coordinate"]["ECG_front_1"], bcg2ecg=False).data[
|
||||
"new_point"],
|
||||
self.data.get_corresponding_interval(
|
||||
Config["Coordinate"]["ECG_front_2"], bcg2ecg=False).data[
|
||||
"new_point"],
|
||||
), Constants.TIPS_TYPE_INFO)
|
||||
|
||||
elif self.ui.radioButton_ECG_back.isChecked():
|
||||
Config["IV_Coordinate"]["ECG_back_1"] = indices[0]
|
||||
Config["IV_Coordinate"]["ECG_back_2"] = indices[-1]
|
||||
Config["Coordinate"]["ECG_back_1"] = self.data.Rpeak[:-2][indices[0]]
|
||||
Config["Coordinate"]["ECG_back_2"] = self.data.Rpeak[:-2][indices[-1]]
|
||||
PublicFunc.text_output(
|
||||
self.ui, Constants.CORRESPONDING_INTERVAL_PROMOTE_TEMPLATE.format(
|
||||
Config["Coordinate"]["ECG_back_1"],
|
||||
Config["Coordinate"]["ECG_back_2"],
|
||||
self.data.get_corresponding_interval(
|
||||
Config["Coordinate"]["ECG_back_1"], bcg2ecg=False).data["new_point"],
|
||||
self.data.get_corresponding_interval(
|
||||
Config["Coordinate"]["ECG_back_2"], bcg2ecg=False).data["new_point"],
|
||||
), Constants.TIPS_TYPE_INFO
|
||||
)
|
||||
|
||||
|
||||
self.figToolbar.rect_start_x = None
|
||||
self.figToolbar.rect_end_x = None
|
||||
|
||||
Reference in New Issue
Block a user