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,16 @@
# Traces the episodes of one sensor through categories.events over a window: the event each one ends in (or none). Args: <detectors dir> <station folder> <from> <to> <sensor>
import sys
from datetime import datetime, timedelta, timezone
from pathlib import Path
det = Path(sys.argv[1]).resolve()
sys.path[:0] = [str(det / "scripts")]
import categories
from data import load
day = lambda d: datetime.strptime(d, "%Y-%m-%d").replace(tzinfo=timezone.utc)
a, b, s = day(sys.argv[3]), day(sys.argv[4]), sys.argv[5]
ms = load(sys.argv[2])
chunk = {k: x for k, v in ms.items() if (x := [m for m in v if a - timedelta(days=3) <= m["t"] < b])}
for v in categories.events(chunk, b):
for e in v["episodes"]:
if s in e["sensors"] and len(e["sensors"]) < 5:
print(v["start"], v["end"], v["category"], "<-", e["start"], e["end"], e["label"])