修复UCD连接错误、修改色准计算方式、修改localdiming选择方块

This commit is contained in:
xinzhu.yin
2026-06-24 15:54:58 +08:00
parent 2d8d4119e3
commit a500751d85
6 changed files with 338 additions and 143 deletions

View File

@@ -10,6 +10,7 @@ import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from app.views.pq_debug_panel import PQDebugPanel
from app.views.modern_styles import get_theme_palette
from app.tests.color_accuracy import get_target_xyY
from typing import TYPE_CHECKING
@@ -755,11 +756,16 @@ def update_accuracy_result_table(self: "PQAutomationApp", accuracy_data, standar
row_Y = ["Y"]
row_tx = ["Target x:CIE31"]
row_ty = ["Target y:CIE31"]
row_tY = ["Target Y"]
row_de2000 = ["ΔE 2000"]
include_itp = bool(delta_e_itp_values)
row_deitp = ["ΔE ITP"] if include_itp else None
white_lv = None
if measurements and len(measurements[0]) >= 3:
white_lv = measurements[0][2]
for i, name in enumerate(color_patches):
m = measurements[i] if i < len(measurements) else None
sx, sy = standards.get(name, (None, None))
@@ -776,6 +782,12 @@ def update_accuracy_result_table(self: "PQAutomationApp", accuracy_data, standar
row_tx.append(fmt(sx, 4))
row_ty.append(fmt(sy, 4))
if white_lv is not None:
_, _, target_Y = get_target_xyY(name, white_lv)
row_tY.append(fmt(target_Y, 4) if target_Y is not None else "N/A")
else:
row_tY.append("N/A")
de = delta_e_values[i] if i < len(delta_e_values) else None
row_de2000.append(fmt(de, 4))
@@ -783,7 +795,7 @@ def update_accuracy_result_table(self: "PQAutomationApp", accuracy_data, standar
ditp = delta_e_itp_values[i] if i < len(delta_e_itp_values) else None
row_deitp.append(fmt(ditp, 4))
rows = [row_x, row_y, row_Y, row_tx, row_ty, row_de2000]
rows = [row_x, row_y, row_Y, row_tx, row_ty, row_tY, row_de2000]
if include_itp and row_deitp is not None:
rows.append(row_deitp)