data: corr_x_mm, corr_y_mm (corr x mm_per_px of targets.csv, load_targets; none for a name whose lines disagree, a distance of 1000 not filled in) and load_weather (weather/, pumped); inventory shows the distance and mm/px of each sensor; summary reads the mm; DATA.md: the targets, the weather
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2c34c711c
commit
7bb0f4e8d1
5 files changed
+87
-11
No files matched your search
+17
-5
@@ -24,7 +24,8 @@ import statistics
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from common import QUALITY, group, without_pose
|
||||
from data import METRIC_RE, filter_window, find_files, image_time, is_reference, iso, load, load_camera, parse_time, rejected
|
||||
from data import (METRIC_RE, filter_window, find_files, image_time, is_reference, iso, load, load_camera, load_targets,
|
||||
parse_time, rejected)
|
||||
|
||||
|
||||
def span(a, b, n):
|
||||
@@ -170,7 +171,7 @@ def missing(instants, cadence):
|
||||
return [(a, b, n) for a, b in zip(instants, instants[1:]) if (n := round((b - a) / cadence) - 1) > 0]
|
||||
|
||||
|
||||
def measurements(by):
|
||||
def measurements(by, targets=None):
|
||||
if not by:
|
||||
print('\nNo measurement: no "advanced" export in this folder.')
|
||||
return
|
||||
@@ -189,12 +190,23 @@ def measurements(by):
|
||||
if empty:
|
||||
print(f" pattern_type empty for {len(empty)} sensors: reference when reproj_err or inlier is filled "
|
||||
"(references only, tools/DATA.md)")
|
||||
print(f"{'sensor':10} {'type':10} {'pattern':11} {'threshold':>9} {'measurements':>12} {'rejected':>8}")
|
||||
targets = targets or {}
|
||||
if targets:
|
||||
print(" distance (m) and mm/px: targets.csv (data.load_targets); \"-\": not in it, or not filled in "
|
||||
"(distance 1000 mm); \"?\": its lines (n) disagree, no corr_x_mm / corr_y_mm")
|
||||
else:
|
||||
print(" no targets.csv: no distance, no corr_x_mm / corr_y_mm")
|
||||
print(f"{'sensor':10} {'type':10} {'pattern':11} {'threshold':>9} {'measurements':>12} {'rejected':>8}"
|
||||
f" {'distance':>9} {'mm/px':>8}")
|
||||
for s in names:
|
||||
ms = by[s]
|
||||
threshold = "/".join(f"{x:g}" for x in sorted({m['error_threshold'] for m in ms}))
|
||||
t = targets.get(s, {})
|
||||
mark = f"?({t['lines']})" if t.get("lines", 0) > 1 else "-"
|
||||
distance = mark if t.get("distance_mm") is None else f"{t['distance_mm'] / 1000:g}"
|
||||
factor = mark if t.get("mm_per_px") is None else f"{t['mm_per_px']:.3f}"
|
||||
print(f"{s:10} {'reference' if is_reference(ms) else 'target':10} {ms[0]['pattern_type']:11} "
|
||||
f"{threshold:>9} {len(ms):12} {sum(map(rejected, ms)):8}")
|
||||
f"{threshold:>9} {len(ms):12} {sum(map(rejected, ms)):8} {distance:>9} {factor:>8}")
|
||||
|
||||
|
||||
def camera(folder, by, start=None, end=None):
|
||||
@@ -275,7 +287,7 @@ def main(folder, start=None, end=None, full=False):
|
||||
contents(folder, f, start, end)
|
||||
images(f["images"], start, end)
|
||||
by = load(folder)
|
||||
measurements(by)
|
||||
measurements(by, load_targets(folder))
|
||||
if by:
|
||||
camera(folder, by)
|
||||
if by and (start or end):
|
||||
|
||||
Reference in new issue
Block a user