Automatic labels, first trial: the analyst labels JUNGFRAU 20-25.10 alone with the labels map (7 labels in labeling/auto/, analysis beside them); the labeling tool shows manual or auto labels from a Labels menu (D-105)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-02 13:40:29 +01:00
1 parent c4a39492bf
commit 2cd129413e
38 files changed
+2468 -22

No files matched your search

@@ -0,0 +1,30 @@
"""Températures de la station (metrics/sensor_*_deg_c) sur une plage : PNG et table toutes les 3 h.
Usage : .venv/bin/python <ce fichier> <dossier station> <jour début AAAA_MM_JJ> <jour fin> <sortie>"""
import csv, glob, sys, os
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from datetime import datetime
dossier, d0, d1, sortie = sys.argv[1:5]
series = {}
for nom in ("thermal", "A0", "CPU", "GPU", "PLL"):
pts = []
for f in sorted(glob.glob(f"{dossier}/metrics/*_sensor_{nom}_deg_c_*.csv")):
jour = os.path.basename(f).split("_deg_c_")[1][:10]
if d0 <= jour <= d1:
for r in csv.DictReader(open(f)):
if r["metric"]:
pts.append((datetime.fromisoformat(r["time_utc"]), float(r["metric"])))
series[nom] = sorted(pts)
fig, ax = plt.subplots(figsize=(14, 5))
for nom, pts in series.items():
ax.plot([t for t, _ in pts], [v for _, v in pts], label=nom)
ax.legend(); ax.grid(alpha=.4); ax.set_ylabel("°C (UTC)")
png = f"{sortie}/temperature_{d0}_{d1}.png"
fig.savefig(png, dpi=90, bbox_inches="tight"); print(png)
th = dict(series["thermal"]); a0 = dict(series["A0"])
for t in sorted(th):
if t.hour % 3 == 0:
print(t.strftime("%m-%d %H:%M"), f"thermal {th[t]:6.2f}", f"A0 {a0.get(t, float('nan')):6.2f}")