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,17 @@
# Counts, per station, the gaps between instants (minute-truncated, as no_data.py) by multiple of the cadence: (1,1.5], (1.5,2.5], >2.5 steps; and the share of last instants of a day not on the cadence grid. Args: data_dir STATION...
import sys
from pathlib import Path
sys.path[:0] = ["/home/maxime/aimsight-detectors/scripts", "/home/maxime/aimsight-tools/scripts"]
from data import load
from episodes import cadence
for st in sys.argv[2:]:
ms = load(str(Path(sys.argv[1]) / st))
ts = sorted({m["t"].replace(second=0, microsecond=0) for v in ms.values() for m in v})
step = cadence(ms)
c = [0, 0, 0]
for a, b in zip(ts, ts[1:]):
r = (b - a) / step
if 1 < r <= 1.5: c[0] += 1
elif 1.5 < r <= 2.5: c[1] += 1
elif r > 2.5: c[2] += 1
print(f"{st:<12} step={step} gaps (1,1.5]={c[0]} (1.5,2.5]={c[1]} >2.5={c[2]} instants={len(ts)}")