- 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>
23 lines
1.6 KiB
Python
23 lines
1.6 KiB
Python
"""Pour une cible, dans quelles étiquettes (Visibility, Obstruction, No data de moins de trois jours) tombent ses rejets, et si l'étiquette la nomme.
|
|
Usage : python3 dans.py STATION CAPTEUR [DEBUT] [FIN]"""
|
|
import csv, glob, json, sys, collections
|
|
from datetime import datetime
|
|
st, cap = sys.argv[1], sys.argv[2]
|
|
d0, d1 = (sys.argv[3:5] + ['2026-10-01', '2026-11-01'])[:2] if len(sys.argv) > 3 else ('2026-10-01', '2026-11-01')
|
|
t = lambda s: datetime.fromisoformat(s.replace('Z', '+00:00').replace(' ', 'T'))
|
|
lab = [(n, json.loads(l)) for n, l in enumerate(open(f'labeling/auto/{st}.jsonl'), 1) if l.strip()]
|
|
lab = [(n, e, t(e['debut']), t(e['fin'])) for n, e in lab if e['categorie'] in ('Visibility', 'Obstruction', 'No data') and (t(e['fin']) - t(e['debut'])).days < 3]
|
|
c = collections.Counter(); hors = []
|
|
for p in sorted(glob.glob(f'data/{st}/displacement/{st}_advanced_2026*.csv')):
|
|
for l in csv.DictReader(open(p)):
|
|
if l['sensor_name'].strip() != cap or not l['error_value'] or float(l['error_value']) <= float(l['error_threshold']): continue
|
|
i = t(l['time_utc'][:19] + '+00:00')
|
|
if not (t(d0 + 'T00:00Z') <= i < t(d1 + 'T00:00Z')): continue
|
|
k = [n for n, e, a, b in lab if a < i < b]
|
|
if k: c[k[0]] += 1
|
|
else: hors.append(i.strftime('%m-%d %H:%M'))
|
|
d = {n: e for n, e, a, b in lab}
|
|
for n, k in sorted(c.items()):
|
|
e = d[n]; print(f"#{n}\t{k}\t{e['categorie']}\t{e['debut']}\t{e['fin']}\t{'nommée' if cap in e['description'] else 'NON NOMMÉE'}\t{e['description'][:90]}")
|
|
print('hors étiquettes :', len(hors), ' '.join(hors))
|