- 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>
29 lines
1.5 KiB
Python
29 lines
1.5 KiB
Python
"""Instants touchés sur une fenêtre : capteurs rejetés (hors PR04) et capteurs hors niveau (plages_gl1.txt : > 6 bruits du niveau glissant ±3 h, hors PR04).
|
|
Usage : python3 labeling/auto/etiqueteur/NORDEND_2026-08-16/outils/touche.py 2026-08-17T02:00 2026-08-17T11:00"""
|
|
import csv, glob, re, sys
|
|
from collections import defaultdict
|
|
from datetime import datetime, timedelta
|
|
D = "labeling/auto/etiqueteur/NORDEND_2026-08-16/"
|
|
a, b = (datetime.fromisoformat(x) for x in sys.argv[1:3])
|
|
rej, off, pres = defaultdict(list), defaultdict(list), set()
|
|
for p in sorted(glob.glob("data/NORDEND/displacement/NORDEND_advanced_*.csv")):
|
|
if (a - timedelta(days=1)).strftime("%Y%m%d") <= p[-12:-4] <= b.strftime("%Y%m%d"):
|
|
for r in csv.DictReader(open(p)):
|
|
t = datetime.fromisoformat(r["time_utc"][:16])
|
|
pres.add(t)
|
|
if float(r["error_value"]) > float(r["error_threshold"]) and r["sensor_name"] != "PR04":
|
|
rej[t].append(r["sensor_name"])
|
|
for l in open(D + "plages_gl1.txt"):
|
|
m = re.match(r"(\d{4}-\d\d-\d\dT\d\d:\d\d)Z\s+\d+\s+(.*?)\|", l)
|
|
if m:
|
|
s = [x for x in m.group(2).split() if not x.startswith("PR04")]
|
|
if s:
|
|
off[datetime.fromisoformat(m.group(1))] = s
|
|
t = a
|
|
while t <= b:
|
|
if t not in pres:
|
|
print(f"{t:%d/%m %H:%M} (pas de mesure)")
|
|
elif rej[t] or off[t]:
|
|
print(f"{t:%d/%m %H:%M} rej {','.join(sorted(rej[t])) or '-':40s} hors {' '.join(off[t])}")
|
|
t += timedelta(minutes=15)
|