Files
aimsight-labeling/auto/revue-croisee/2026-11-04/derniers/coherence/outils/pr17_nuits.py
T
maximeandClaude Opus 5.5 14ad6ea3f9 Auto labels reviewed per station and cross-reviewed; all labeling knowledge in labeling/ (D-130)
- Every station's auto labels reviewed by an analyst (/review-auto-labels), then a
  cross-review per family across all stations (new skill /cross-review-labels),
  a finishing pass, and descriptions rewritten in words (no numeric values).
- The three never-labeled ranges (WILDSTRUBEL 07/09-01/10, NORDEND 16/08-01/10)
  labeled and reviewed: 991 auto labels on 11 stations, labeling/controle.py at 0 errors.
- Labeling knowledge gathered in labeling/: regles-d-etiquetage.md (new), familles.md
  (settled boundaries), connaissances/ (notes moved from docs/, links updated),
  the label map rebuilt from reviewed labels, events and cases; events tied to their
  stations (PS_DES_COUDRES is JUNGFRAU). The labeler and reviewers read only labeling/.
- labels-map reads auto labels and events; decision D-130; living plan points 73-75.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:21:57 +01:00

27 lines
1.5 KiB
Python

"""PR17 face à ses voisines, nuit par nuit (20 h -> 3 h UTC) : position brute x, y de PR17 moins la médiane des voisines
(PR18, PR12, PR16) au même instant, médiane de la nuit ; et corr_x, corr_y, error_value de PR17 (mesures acceptées).
Lit le cache de finition/nordend/outils (jours_td.py). Usage, depuis la racine : python3 <ce fichier>"""
import pickle, statistics as st
from datetime import timedelta
M, C, T = pickle.load(open("labeling/auto/revue-croisee/2026-11-04/finition/nordend/outils/cache.pkl", "rb"))
V = ["PR18", "PR12", "PR16"]
idx = {s: {m["t"]: m for m in M[s]} for s in V + ["PR17"]}
nuits = {}
for t, m in idx["PR17"].items():
if not (t.hour >= 20 or t.hour < 3):
continue
j = (t - timedelta(hours=12)).date()
vs = [idx[s].get(t) for s in V]
if any(v is None or v["x"] is None for v in vs) or m["x"] is None:
continue
d = nuits.setdefault(j, {"dx": [], "dy": [], "cx": [], "cy": [], "ev": []})
d["dx"].append(m["x"] - st.median(v["x"] for v in vs)); d["dy"].append(m["y"] - st.median(v["y"] for v in vs))
for k, c in (("cx", "corr_x"), ("cy", "corr_y"), ("ev", "error_value")):
if m.get(c) is not None: d[k].append(m[c])
ref = None
print("nuit dx_brut dy_brut (PR17 - voisines, px, face à la 1re nuit) | corr_x corr_y error_value")
for j in sorted(nuits):
d = nuits[j]; g = lambda k: st.median(d[k]) if d[k] else float("nan")
if ref is None: ref = (g("dx"), g("dy"))
print(f"{j:%d/%m} {g('dx') - ref[0]:+.3f} {g('dy') - ref[1]:+.3f} | {g('cx'):+.3f} {g('cy'):+.3f} {g('ev'):.3f}")