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,21 @@
# Per family on a range: labels, labels overlapped by an event of the family, events, events overlapping no label of the family. Args: <detectors folder> <station folder> <labels.jsonl> <from YYYY-MM-DD> <to YYYY-MM-DD>
import sys
from pathlib import Path
det = Path(sys.argv[1]).resolve()
sys.path[:0] = [str(det / "bench"), str(det / "scripts")]
import score # noqa: E402
from data import iso, load, parse_time # noqa: E402
start, end = iso(parse_time(sys.argv[4])), iso(parse_time(sys.argv[5]))
labels = score.read_labels(sys.argv[3], start, end)
evts = score.events(load(sys.argv[2]), start, end, sys.argv[2])
ov = lambda a, b: a["start"] <= b["end"] and a["end"] >= b["start"] # noqa: E731
print("| Family | labelled | found | flagged | wrongly |\n|---|---|---|---|---|")
for f in sorted({l["family"] for l in labels} | {e["category"] for e in evts}):
L = [l for l in labels if l["family"] == f]
E = [e for e in evts if e["category"] == f]
found = [l for l in L if any(ov(l, e) for e in E)]
wrong = [e for e in E if not any(ov(l, e) for l in L)]
print(f"| {f} | {len(L)} | {len(found)} | {len(E)} | {len(wrong)} |")
for l in L:
if l not in found:
print(" missed:", l["id"], l["start"], l["end"])