From 064422fe9d164be4028dc2a1ff0efe0c7ad721c8 Mon Sep 17 00:00:00 2001 From: marques <20172333133@m.scnu.edu.cn> Date: Wed, 4 Jun 2025 16:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E8=BE=93=E5=87=BA=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- func/Module_precisely_align.py | 45 +++------------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/func/Module_precisely_align.py b/func/Module_precisely_align.py index cb10bb9..e674d4b 100644 --- a/func/Module_precisely_align.py +++ b/func/Module_precisely_align.py @@ -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