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 @@
"""Prints, for given sensors around an instant, error_value (in MAD above the sensor median, and / threshold), flux, corr_x, corr_y. Args: <detectors> <station folder> <iso center> <minutes half-width> <sensor,...>"""
import sys
from datetime import timedelta
from pathlib import Path
det = Path(sys.argv[1]).resolve()
sys.path[:0] = [str(det / "scripts"), str(det.parents[0] / "aimsight-tools" / "scripts")]
from data import load, parse_time # noqa
from episodes import level # noqa
c, w = parse_time(sys.argv[3]), timedelta(minutes=int(sys.argv[4]))
ms = load(sys.argv[2])
for s in sys.argv[5].split(","):
v = ms[s]
med, mad = level([m["error_value"] for m in v if m["error_value"] is not None])
print(s, f"median {med:.3g} mad {mad:.3g}")
for m in v:
if c - w <= m["t"] <= c + w:
e = m["error_value"]
z = f"{(e - med) / mad:7.1f}" if e is not None else " -"
r = f"{e / m['error_threshold']:.2f}" if e is not None and m["error_threshold"] else "-"
f = lambda k: f"{m.get(k):.3f}" if isinstance(m.get(k), float) else str(m.get(k))
print(" ", m["t"].strftime("%m-%d %H:%M"), "z", z, "ratio", r, "flux", f("flux"), "cx", f("corr_x"), "cy", f("corr_y"))