From 8218562aa7e80bcf40b85ac4097577ec3add25ec Mon Sep 17 00:00:00 2001 From: mmmistgun <20172333133@m.scnu.edu.cn> Date: Fri, 8 Apr 2022 10:39:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9flow=20patience=201=202=20=E4=B8=BAT?= =?UTF-8?q?=20P?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/Quality_Relabel.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/Quality_Relabel.py b/utils/Quality_Relabel.py index b1685a2..56896bf 100644 --- a/utils/Quality_Relabel.py +++ b/utils/Quality_Relabel.py @@ -148,7 +148,10 @@ class Quality_Relabel: if index in self.channel_list: # 重命名flow patient通道 if index == 'Flow Patient': - index = index + str(sub_index) + if sub_index == 1: + index = "Flow T" + else: + index = "Flow P" sub_index += 1 signal = file.readSignal(i) sample_frequency = file.getSampleFrequency(i) @@ -304,11 +307,11 @@ class Quality_Relabel: # 绘制 Flow1 plt.subplot(gs[0]) - self.plt_channel(plt_=plt, SP=ecg_SP, EP=ecg_EP, channel="Flow Patient1") + self.plt_channel(plt_=plt, SP=ecg_SP, EP=ecg_EP, channel="Flow T") # 绘制 Flow2 plt.subplot(gs[1]) - self.plt_channel(plt_=plt, SP=ecg_SP, EP=ecg_EP, channel="Flow Patient2", + self.plt_channel(plt_=plt, SP=ecg_SP, EP=ecg_EP, channel="Flow P", title=f"PSG sampNo:{self.sampNo} Epoch:{one_ecg_data['Epoch']} Duration:{one_ecg_data['Duration']}") plt.subplot(gs[2])