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:
maximeandClaude Opus 5.5 committed 2026-11-18 17:47:59 +01:00
1 parent 8a81c53cd9
commit 0cfbd1b7bc
363 files changed
+30822

No files matched your search

@@ -0,0 +1,27 @@
"""For a sensor of a station on a range: at each of its rejected instants, how many other sensors are rejected (out of those measured); a histogram.
Usage: python3 shared.py <station folder> <from YYYY-MM-DD> <to YYYY-MM-DD> <sensor>
"""
import sys
from collections import Counter
from datetime import datetime, timezone
from pathlib import Path
ROOT = Path("/home/maxime/aimsight-optimizer")
sys.path[:0] = [str(ROOT / "detectors" / "scripts"), str(ROOT / "tools" / "scripts")]
from data import load, rejected # noqa: E402
folder, a, b, sensor = sys.argv[1:5]
day = lambda d: datetime.strptime(d, "%Y-%m-%d").replace(tzinfo=timezone.utc) # noqa: E731
ms_all = load(folder)
at = {}
for s, ms in ms_all.items():
for m in ms:
if day(a) <= m["t"] < day(b):
at.setdefault(m["t"], {})[s] = rejected(m)
hist = Counter()
for t, r in sorted(at.items()):
if r.get(sensor):
others = {s: x for s, x in r.items() if s != sensor}
hist[(sum(others.values()), len(others))] += 1
for (k, n), c in sorted(hist.items()):
print(f"{k}/{n} others rejected: {c} instants")