修复bug0,1,2
This commit is contained in:
parent
ea868dc4b6
commit
383b19772b
@ -82,9 +82,10 @@ PSG_Post: 对PSG后端截断若干个点,单位为点的个数,仅计算信
|
||||
### 2.7 保存结果
|
||||
在符合上述条件的情况下,点击`保存`,会在当前程序下同级目录生成或追加`RespCoarseAlignInfo.csv`文件,记录对齐结果
|
||||
|
||||
bug0: setting.yaml 不存在时程序无法打开
|
||||
bug1: 预置截断时,选点后图显示不准确
|
||||
bug2: 自定义起始位置spinbox编辑未结束会进行计算
|
||||
|
||||
~~bug0: setting.yaml 不存在时程序无法打开~~ 已修复
|
||||
~~bug1: 预置截断时,选点后图显示不准确~~ 已修复
|
||||
~~bug2: 自定义起始位置spinbox编辑未结束会进行计算~~ 已修复
|
||||
|
||||
todo1: 将相关计算分段计算,减少程序卡顿
|
||||
todo2: 将程序编译为exe文件,减少安装依赖的过程
|
||||
|
@ -95,6 +95,10 @@ class SettingWindow(QMainWindow):
|
||||
self.__read_settings__()
|
||||
|
||||
def __read_settings__(self):
|
||||
if not Path("./config.yaml").exists():
|
||||
with open("./config.yaml", "w") as f:
|
||||
yaml.dump(Conf, f)
|
||||
|
||||
with open("./config.yaml", "r") as f:
|
||||
fileConfig = yaml.load(f.read(), Loader=yaml.FullLoader)
|
||||
Conf.update(fileConfig)
|
||||
@ -416,28 +420,28 @@ class Data:
|
||||
def DrawPicTryAlign(self):
|
||||
fig = Figure(figsize=(8, 7), dpi=100)
|
||||
canvas = FigureCanvas(fig)
|
||||
max_x = max(self.processed_THO.shape[0] + self.Config["PSGConfig"]["PreA"],
|
||||
self.processed_XX.shape[0] + self.Config["XXConfig"]["PreA"] + self.Config["pos"])
|
||||
max_x = max(self.processed_THO.shape[0],
|
||||
self.processed_XX.shape[0] + self.Config["pos"])
|
||||
min_x = min(self.Config["PSGConfig"]["PreA"], self.Config["XXConfig"]["PreA"] + self.Config["pos"], 0)
|
||||
|
||||
ax1 = fig.add_subplot(311)
|
||||
ax1.plot(
|
||||
np.linspace(self.Config["PSGConfig"]["PreA"], len(self.processed_THO) + self.Config["PSGConfig"]["PreA"],
|
||||
np.linspace(0, len(self.processed_THO),
|
||||
len(self.processed_THO)), self.processed_THO, color='blue')
|
||||
# 绘制x = PreCut的线 和 x = PostCut的虚线
|
||||
ax1.set_xlim(min_x, max_x)
|
||||
ax1.set_title("THO")
|
||||
|
||||
ax2 = fig.add_subplot(312)
|
||||
ax2.plot(np.linspace(self.Config["XXConfig"]["PreA"] + self.Config["pos"],
|
||||
len(self.processed_XX) + self.Config["XXConfig"]["PreA"] + self.Config["pos"],
|
||||
ax2.plot(np.linspace(self.Config["pos"],
|
||||
len(self.processed_XX) + self.Config["pos"],
|
||||
len(self.processed_XX)), self.processed_XX, color='blue')
|
||||
ax2.set_xlim(min_x, max_x)
|
||||
ax2.set_title("xinxiao")
|
||||
|
||||
ax3 = fig.add_subplot(313)
|
||||
ax3.plot(
|
||||
np.linspace(self.Config["PSGConfig"]["PreA"], len(self.processed_ABD) + self.Config["PSGConfig"]["PreA"],
|
||||
np.linspace(0, len(self.processed_ABD),
|
||||
len(self.processed_ABD)), self.processed_ABD, color='blue')
|
||||
ax3.set_xlim(min_x, max_x)
|
||||
ax3.set_title("ABD")
|
||||
@ -568,7 +572,8 @@ class MainWindow(QMainWindow):
|
||||
self.ui.checkBox_PTHO.stateChanged.connect(self.__enableAlign__)
|
||||
self.ui.checkBox_PABD.stateChanged.connect(self.__enableAlign__)
|
||||
self.ui.checkBox_NABD.stateChanged.connect(self.__enableAlign__)
|
||||
self.ui.spinBox_custom.valueChanged.connect(self.__enableAlign__)
|
||||
self.ui.spinBox_custom.editingFinished.connect(self.__enableAlign__)
|
||||
|
||||
|
||||
def __readInfo__(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user