feat: rebuild Data tab compare view
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user