sessions of 2026-11-18 (the optimization campaign; three runs without summary, interrupted and rerun)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a81c53cd9
commit
0cfbd1b7bc
363 files changed
+30822
No files matched your search
@@ -0,0 +1,27 @@
|
||||
# Daily share of "own" rejections per sensor: rejected while at most K other sensors are rejected at the same instant. Args: station_folder FROM TO sensor[,sensor...] K
|
||||
import sys
|
||||
from datetime import datetime, timezone
|
||||
sys.path[:0] = ["/home/maxime/aimsight-tools/scripts", "/home/maxime/aimsight-detectors/scripts"]
|
||||
from data import load
|
||||
from target_issue import rejected
|
||||
|
||||
folder, a, b, sensors, k = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4].split(","), int(sys.argv[5])
|
||||
ms = load(folder)
|
||||
a = datetime.fromisoformat(a).replace(tzinfo=timezone.utc)
|
||||
b = datetime.fromisoformat(b).replace(tzinfo=timezone.utc)
|
||||
at = {}
|
||||
for s, l in ms.items():
|
||||
for m in l:
|
||||
if rejected(m):
|
||||
at[m["t"]] = at.get(m["t"], 0) + 1
|
||||
days = {}
|
||||
for s in sensors:
|
||||
for m in ms.get(s, []):
|
||||
t = m["t"]
|
||||
if a <= t < b:
|
||||
c = days.setdefault(t.date(), {}).setdefault(s, [0, 0])
|
||||
c[0] += rejected(m) and at[t] - 1 <= k
|
||||
c[1] += 1
|
||||
print("day " + " ".join(f"{s:>8}" for s in sensors))
|
||||
for d in sorted(days):
|
||||
print(d, " ".join(f"{100 * days[d][s][0] / days[d][s][1]:7.0f}%" if s in days[d] else " -" for s in sensors))
|
||||
Reference in new issue
Block a user