修改引用逻辑、新增Pattern更改界面、新增Calman灰阶界面

This commit is contained in:
xinzhu.yin
2026-05-27 11:26:28 +08:00
parent a903c17cb3
commit dff4e0df4d
24 changed files with 3327 additions and 386 deletions

View File

@@ -5,8 +5,14 @@ Step 2 重构:从 pqAutomationApp.PQAutomationApp.plot_accuracy 原样搬迁
from matplotlib.patches import Rectangle
from typing import TYPE_CHECKING
def plot_accuracy(self, accuracy_data, test_type):
if TYPE_CHECKING:
from pqAutomationApp import PQAutomationApp
def plot_accuracy(self: "PQAutomationApp", accuracy_data, test_type):
"""绘制色准测试结果 - 29色显示 - 简洁版布局(显示 Gamma"""
self.accuracy_ax.clear()
@@ -319,3 +325,10 @@ def plot_accuracy(self, accuracy_data, test_type):
self.accuracy_canvas.draw()
self.chart_notebook.select(self.accuracy_chart_frame)
class PlotAccuracyMixin:
"""由 tools/refactor_to_mixins.py 自动生成。
把本模块的自由函数挂到 PQAutomationApp 上,便于 F12 跳转与类型推断。
"""
plot_accuracy = plot_accuracy

View File

@@ -1,12 +1,18 @@
"""CCT / 色度一致性绘制。
"""CCT / 色度一致性绘制。
Step 2 重构:从 pqAutomationApp.PQAutomationApp.plot_cct 原样搬迁。
"""
import numpy as np
from typing import TYPE_CHECKING
def plot_cct(self, test_type):
if TYPE_CHECKING:
from pqAutomationApp import PQAutomationApp
def plot_cct(self: "PQAutomationApp", test_type):
"""绘制 x 和 y 坐标分离图 - 每个点标注纵坐标值"""
self.cct_fig.clear()
@@ -322,3 +328,10 @@ def plot_cct(self, test_type):
self.chart_notebook.select(self.cct_chart_frame)
self.log_gui.log("xy 色度坐标图绘制完成", level="success")
class PlotCctMixin:
"""由 tools/refactor_to_mixins.py 自动生成。
把本模块的自由函数挂到 PQAutomationApp 上,便于 F12 跳转与类型推断。
"""
plot_cct = plot_cct

View File

@@ -5,8 +5,14 @@ Step 2 重构:从 pqAutomationApp.PQAutomationApp.plot_contrast 原样搬迁
from matplotlib.patches import Rectangle
from typing import TYPE_CHECKING
def plot_contrast(self, contrast_data, test_type):
if TYPE_CHECKING:
from pqAutomationApp import PQAutomationApp
def plot_contrast(self: "PQAutomationApp", contrast_data, test_type):
"""绘制对比度测试结果 - 固定布局版本"""
# 清空并重置
@@ -165,3 +171,10 @@ def plot_contrast(self, contrast_data, test_type):
self.contrast_canvas.draw()
self.chart_notebook.select(self.contrast_chart_frame)
class PlotContrastMixin:
"""由 tools/refactor_to_mixins.py 自动生成。
把本模块的自由函数挂到 PQAutomationApp 上,便于 F12 跳转与类型推断。
"""
plot_contrast = plot_contrast

View File

@@ -1,12 +1,18 @@
"""EOTF 曲线绘制HDR
"""EOTF 曲线绘制HDR
Step 2 重构:从 pqAutomationApp.PQAutomationApp.plot_eotf 原样搬迁。
"""
import numpy as np
from typing import TYPE_CHECKING
def plot_eotf(self, L_bar, results_with_eotf_list, test_type):
if TYPE_CHECKING:
from pqAutomationApp import PQAutomationApp
def plot_eotf(self: "PQAutomationApp", L_bar, results_with_eotf_list, test_type):
"""绘制 EOTF 曲线 + 数据表格HDR 专用,包含实测亮度)"""
# ========== 1. 清空并重置左侧曲线 ==========
@@ -146,3 +152,10 @@ def plot_eotf(self, L_bar, results_with_eotf_list, test_type):
pass
self.log_gui.log("EOTF 曲线 + 数据表格绘制完成", level="success")
class PlotEotfMixin:
"""由 tools/refactor_to_mixins.py 自动生成。
把本模块的自由函数挂到 PQAutomationApp 上,便于 F12 跳转与类型推断。
"""
plot_eotf = plot_eotf

View File

@@ -1,12 +1,18 @@
"""Gamma 曲线绘制。
"""Gamma 曲线绘制。
Step 2 重构:从 pqAutomationApp.PQAutomationApp.plot_gamma 原样搬迁。
"""
import numpy as np
from typing import TYPE_CHECKING
def plot_gamma(self, L_bar, results_with_gamma_list, target_gamma, test_type):
if TYPE_CHECKING:
from pqAutomationApp import PQAutomationApp
def plot_gamma(self: "PQAutomationApp", L_bar, results_with_gamma_list, target_gamma, test_type):
"""绘制Gamma曲线 + 数据表格(包含实测亮度)"""
# ========== 1. 清空并重置左侧曲线 ==========
@@ -140,3 +146,10 @@ def plot_gamma(self, L_bar, results_with_gamma_list, target_gamma, test_type):
self.chart_notebook.select(self.gamma_chart_frame)
self.log_gui.log("Gamma曲线 + 数据表格绘制完成", level="success")
class PlotGammaMixin:
"""由 tools/refactor_to_mixins.py 自动生成。
把本模块的自由函数挂到 PQAutomationApp 上,便于 F12 跳转与类型推断。
"""
plot_gamma = plot_gamma

View File

@@ -27,6 +27,11 @@ from app.plots.gamut_background import (
get_cie1976_background,
)
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from pqAutomationApp import PQAutomationApp
# ============ 参考色域定义CIE 1931 xy============
_REF_GAMUTS_XY = {
@@ -193,7 +198,7 @@ def _blit_background(ax, background, bbox):
# 主入口
# ============================================================
def plot_gamut(self, results, coverage, test_type):
def plot_gamut(self: "PQAutomationApp", results, coverage, test_type):
"""绘制色域图(图像层 + 框架层分离架构)。"""
ax_xy = self.gamut_ax_xy
@@ -408,3 +413,10 @@ def plot_gamut(self, results, coverage, test_type):
self.sync_gamut_toolbar()
self.log_gui.log("色域图绘制完成", level="success")
class PlotGamutMixin:
"""由 tools/refactor_to_mixins.py 自动生成。
把本模块的自由函数挂到 PQAutomationApp 上,便于 F12 跳转与类型推断。
"""
plot_gamut = plot_gamut