"""Températures et tension horaires de NORDEND, 10-15/08 (une ligne par heure, une colonne par métrique). Lancer depuis la racine : python3 labeling/auto/etiqueteur/NORDEND_2026-08-10/outils/metriques.py """ import csv, glob M = ["sensor_thermal_deg_c", "sensor_CPU_deg_c", "sensor_A0_deg_c", "BusVoltage", "Power"] val = {} for m in M: for j in range(10, 16): for p in glob.glob(f"data/NORDEND/metrics/NORDEND_{m}_2026_08_{j:02d}_*.csv"): with open(p) as f: for r in csv.DictReader(f): val.setdefault(r["time_utc"][:13], {})[m] = float(r["metric"]) print("heure " + " ".join(f"{m[:12]:>12}" for m in M)) for h in sorted(val): print(h + " " + " ".join(f"{val[h].get(m, float('nan')):12.2f}" for m in M))