Essai arrêté : batch du 2026-11-06 (scan, séance interrompue sans commit), audit du scan du 06, bilan de l'essai ; suivre.py --fin
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e24df09a0
commit
010c297f60
35 files changed
+904
-2
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# Print, around an instant, what visibility.py point 2 sees: high sensors (n), sensors rejected at FACTOR x their median, rejected sensors.
|
||||
# Usage: python3 brief_debug.py <detectors dir> <station folder> <from ISO> <to ISO>
|
||||
import statistics
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, sys.argv[1] + "/scripts")
|
||||
import data # noqa: E402
|
||||
import visibility as V # noqa: E402
|
||||
|
||||
ms = data.load(sys.argv[2])
|
||||
a, b = data.parse_time(sys.argv[3]), data.parse_time(sys.argv[4])
|
||||
refs = {s for s, v in ms.items() if v[0]["pattern_type"] == "global_ref"}
|
||||
rows = {}
|
||||
for s, v in ms.items():
|
||||
e = [m["error_value"] for m in v if m["error_value"] is not None]
|
||||
if len(e) < 10:
|
||||
continue
|
||||
med = statistics.median(e)
|
||||
mad = statistics.median(abs(x - med) for x in e) or 1e-9
|
||||
for m in v:
|
||||
x = m["error_value"]
|
||||
if x is None or not a <= m["t"] <= b:
|
||||
continue
|
||||
rej = m["error_threshold"] and x > m["error_threshold"]
|
||||
r = rows.setdefault(m["t"], {"high": [], "strong": [], "rej": []})
|
||||
if x > med + V.K_MAD * mad and (x > V.FACTOR * med or rej and x > V.REJECT_FACTOR * med):
|
||||
r["high"].append(s)
|
||||
if rej:
|
||||
r["rej"].append(s)
|
||||
if x > V.FACTOR * med:
|
||||
r["strong"].append(s + ("(R)" if s in refs else ""))
|
||||
for t in sorted(rows):
|
||||
r = rows[t]
|
||||
print(f"{t:%H:%M} high={sorted(r['high'])} strong={sorted(r['strong'])} rejected={len(r['rej'])}")
|
||||
Reference in new issue
Block a user