feat: rebuild Data tab compare view

This commit is contained in:
jack
2026-07-06 13:01:24 -07:00
parent 0f813b2376
commit f604308466
3 changed files with 705 additions and 565 deletions
File diff suppressed because it is too large Load Diff
@@ -357,6 +357,10 @@ class SessionController(QObject):
result = compare_runs(series_a, series_b)
# Mean temporal shif along the DTW path: positive means run B
# reaches the same profile features lather than run A.
path = result["warping_path"]
frame_offset = round(sum(j - i for i, j in path) / len(path)) if path else 0
# Max sensor deviation: walk the DTW-aligned frame pairs and take
# the largest per-sensor abs difference across all sensors, not
# just the sensor[0] series used for alignment.
@@ -419,6 +423,7 @@ class SessionController(QObject):
"success": True,
"distance": result["distance"],
"warping_path": result["warping_path"][:50], # limit path size
"frame_offset": frame_offset,
"max_sensor_deviation": max_sensor_deviation,
"series_a": series_a,
"series_b": series_b,