Files
Support-Agent/labeling/auto/etiqueteur/BREITHORN_2026-10-20/outils/table.py
T
maximeandClaude Opus 5.5 6fbd7510b7 Etiqueteur: October labels for 8 stations; its folder moves to labeling/auto/etiqueteur/, analyses and scripts versioned (D-126)
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>
2026-11-03 16:33:41 +01:00

27 lines
984 B
Python

"""Table par instant et par capteur d'une colonne de l'export advanced (lot). Usage: table.py COLONNE"""
import csv, glob, sys
col = sys.argv[1]
D, F = "2026-10-20", "2026-11-01"
rows = {}
sensors = []
for f in sorted(glob.glob("data/BREITHORN/displacement/BREITHORN_advanced_*.csv")):
for r in csv.DictReader(open(f)):
t = r["time_utc"][:16]
if not (D <= t < F):
continue
s = r["sensor_name"]
if s not in sensors:
sensors.append(s)
v = r[col]
rej = float(r["error_value"]) > float(r["error_threshold"])
txt = "" if v == "" else f"{float(v):.3f}"
if rej:
txt += "*"
if col == "error_value" or True:
if r["inlier"] == "0.0":
txt += "o"
rows.setdefault(t, {})[s] = txt
print("instant " + " ".join(f"{s[:8]:>8}" for s in sensors))
for t in sorted(rows):
print(t + " " + " ".join(f"{rows[t].get(s, '-'):>8}" for s in sensors))