Optimizer : l'optimisation des détecteurs depuis une analyse (skill improve, ex wf-improve, agents du dépôt agents, benchmark detectors/bench) ; le batch et le scanner archivés
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
010c297f60
commit
2cb0c88a2b
117 files changed
+132
-38
No files matched your search
@@ -0,0 +1,25 @@
|
||||
# Dump, per sensor, error_value / threshold / sensor median and corr_x, corr_y over a time window (rejected = '*').
|
||||
# Usage: python3 window.py <detectors dir> <station folder> <from ISO> <to ISO> [--refs-only]
|
||||
import statistics
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, sys.argv[1] + "/scripts")
|
||||
import data # noqa: E402
|
||||
|
||||
ms = data.load(sys.argv[2])
|
||||
a, b = data.parse_time(sys.argv[3]), data.parse_time(sys.argv[4])
|
||||
for s, v in sorted(ms.items()):
|
||||
ref = v[0]["pattern_type"] == "global_ref"
|
||||
if "--refs-only" in sys.argv and not ref:
|
||||
continue
|
||||
e = [m["error_value"] for m in v if m["error_value"] is not None]
|
||||
med = statistics.median(e) if e else 0
|
||||
row = []
|
||||
for m in v:
|
||||
if a <= m["t"] <= b:
|
||||
ev, th = m["error_value"], m["error_threshold"]
|
||||
rej = "*" if ev is not None and th and ev > th else " "
|
||||
cx = " - " if m["corr_x"] is None else f"{m['corr_x']:+.1f}"
|
||||
cy = " - " if m["corr_y"] is None else f"{m['corr_y']:+.1f}"
|
||||
row.append(f"{m['t']:%H:%M}{rej}{(ev or 0) / med if med else 0:.1f}x {cx},{cy}")
|
||||
print(f"{s[:14]:<14}{'R' if ref else ' '} th/med={((v[-1]['error_threshold'] or 0) / med) if med else 0:.1f} | " + " | ".join(row))
|
||||
Reference in new issue
Block a user