- 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>
25 lines
1.5 KiB
Python
25 lines
1.5 KiB
Python
"""Trous courts (1 à 2 pas) sur toutes les données de chaque station, hors lots compris : leur nombre par heure UTC,
|
|
et les nuits où un trou tombe entre 01:00 et 03:00, avec les stations touchées (lancé depuis la racine)."""
|
|
import csv, glob, os, statistics, collections
|
|
from datetime import datetime
|
|
def UTC(s): return datetime.fromisoformat(s.replace(' ', 'T')[:16] + '+00:00')
|
|
par_h = collections.defaultdict(collections.Counter); nuits = collections.defaultdict(set)
|
|
for st in ['BREITHORN', 'CLARIDEN', 'FLORIDA', 'JUNGFRAU', 'LENZSPITZE', 'MICHIGAN', 'NEBRASKA', 'NIEDERHORN', 'NORDEND', 'SNCF01', 'WILDSTRUBEL']:
|
|
ts = set()
|
|
for p in glob.glob(f'data/{st}/displacement/{st}_advanced_*.csv'):
|
|
with open(p) as f:
|
|
next(f)
|
|
for l in f:
|
|
if l[:2] == '20': ts.add(l[:16])
|
|
ts = sorted(UTC(t) for t in ts)
|
|
pas = statistics.median([(y - x).total_seconds() for x, y in zip(ts, ts[1:])])
|
|
for x, y in zip(ts, ts[1:]):
|
|
n = round((y - x).total_seconds() / pas) - 1
|
|
if 1 <= n <= 2 and pas <= 3600:
|
|
par_h[st][x.hour] += 1
|
|
if 1 <= x.hour <= 2: nuits[f'{x:%m-%d}'].add(f'{st}@{x:%H:%M}')
|
|
print(f'{st:<12} pas {pas/60:3.0f} min, {ts[0]:%m-%d} -> {ts[-1]:%m-%d}, trous courts par heure : '
|
|
+ ' '.join(f'{h}:{par_h[st][h]}' for h in range(24) if par_h[st][h]))
|
|
print('\nnuits avec un trou court entre 01:00 et 03:00 (instant de la mesure d\'avant)')
|
|
for n in sorted(nuits): print(n, ' '.join(sorted(nuits[n])))
|