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,20 @@
# Dumps the episodes of every detector (or one kind) over a window as categories.window sees it (3 days of history): start, end, kind, label, sensors, text. Args: <detectors dir> <station folder> <from> <to> [kind]
import sys
from datetime import datetime, timedelta, timezone
from pathlib import Path
det = Path(sys.argv[1]).resolve()
sys.path[:0] = [str(det / "scripts"), str(det.parents[0] / "aimsight-tools" / "scripts"), str(Path.cwd() / "tools" / "scripts")]
import importlib
from data import load
day = lambda d: datetime.strptime(d, "%Y-%m-%d").replace(tzinfo=timezone.utc)
start, end = day(sys.argv[3]), day(sys.argv[4])
ms = load(sys.argv[2])
chunk = {s: k for s, v in ms.items() if (k := [m for m in v if start - timedelta(days=3) <= m["t"] < end])}
kind = sys.argv[5] if len(sys.argv) > 5 else None
for name in ("displacement", "no_data", "target_issue", "thermal_displacement", "visibility"):
mod = importlib.import_module(name)
eps = mod.detect(chunk, **({"end": end} if name == "no_data" else {}))
for e in eps:
if kind and e["kind"] != kind and e["label"] != kind:
continue
print(e["start"], e["end"], e["kind"], "|", e["label"], "|", ",".join(e["sensors"])[:80], "|", e["text"][:120])