- 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>
34 lines
1.7 KiB
Python
34 lines
1.7 KiB
Python
"""Par jour (UTC) et par capteur : médiane d'error_value de nuit (20-03) et de jour (08-17), part de mesures rejetées, heures des rejets (comptées par heure),
|
|
médianes de corr_x, corr_y des mesures acceptées. NORDEND, 10/08-09/09.
|
|
Usage : python3 labeling/auto/etiqueteur/NORDEND_2026-08-16/outils/jour_capteur.py PR04[,PR07]
|
|
"""
|
|
import csv, glob, statistics as st, sys
|
|
from collections import defaultdict
|
|
from datetime import datetime
|
|
|
|
caps = sys.argv[1].split(",")
|
|
d = {c: defaultdict(list) for c in caps}
|
|
for p in sorted(glob.glob("data/NORDEND/displacement/NORDEND_advanced_*.csv")):
|
|
if "20260810" <= p[-12:-4] <= "20260909":
|
|
for r in csv.DictReader(open(p)):
|
|
if r["sensor_name"] in d:
|
|
t = datetime.fromisoformat(r["time_utc"])
|
|
e = float(r["error_value"])
|
|
d[r["sensor_name"]][t.date()].append((t.hour, e, e > float(r["error_threshold"]),
|
|
float(r["corr_x"]) if r["corr_x"] else None, float(r["corr_y"]) if r["corr_y"] else None))
|
|
for c in caps:
|
|
print(f"== {c}")
|
|
for j in sorted(d[c]):
|
|
L = d[c][j]
|
|
nuit = [e for h, e, *_ in L if h >= 20 or h < 3]
|
|
jour = [e for h, e, *_ in L if 8 <= h < 17]
|
|
rej = [h for h, e, r, *_ in L if r]
|
|
hs = defaultdict(int)
|
|
for h in rej:
|
|
hs[h] += 1
|
|
cx = [x for *_, x, y in L if x is not None]
|
|
cy = [y for *_, x, y in L if y is not None]
|
|
m = lambda v: f"{st.median(v):.3f}" if v else " - "
|
|
print(f"{j:%d/%m} n={len(L):3d} ev nuit {m(nuit)} jour {m(jour)} rej {len(rej):3d} ({100 * len(rej) / len(L):3.0f}%) "
|
|
f"cx {m(cx)} cy {m(cy)} h: {' '.join(f'{h}:{n}' for h, n in sorted(hs.items()))}")
|