Labels for CLARIDEN, FLORIDA, JUNGFRAU (gaps 06-20.10, 26.10-01.11), LENZSPITZE, NIEDERHORN, NORDEND, SNCF01, WILDSTRUBEL. Figures and tool outputs stay out of git. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
550 B
Python
14 lines
550 B
Python
"""Metriques systeme de SNCF01 par heure : BusVoltage, BusCurrent, Power (une ligne par heure)."""
|
|
import csv, glob, sys
|
|
from collections import defaultdict
|
|
|
|
d = defaultdict(dict)
|
|
for m in ("BusVoltage", "BusCurrent", "Power"):
|
|
for f in glob.glob(f"data/SNCF01/metrics/SNCF01_{m}_*.csv"):
|
|
for r in csv.DictReader(open(f)):
|
|
d[r["time_utc"][:16]][m] = r["metric"]
|
|
deb, fin = sys.argv[1], sys.argv[2]
|
|
for t in sorted(d):
|
|
if deb <= t <= fin:
|
|
print(t, *(d[t].get(m, "") for m in ("BusVoltage", "BusCurrent", "Power")))
|