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>
This commit is contained in:
1 parent
2bba388290
commit
6fbd7510b7
112 files changed
+8951
-6
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""Recadre la même zone de plusieurs images et les met côte à côte. Usage: crop.py X0,Y0,X1,Y1 sortie.png HHMM_ids..."""
|
||||
import sys, glob
|
||||
from PIL import Image, ImageDraw
|
||||
box = tuple(int(v) for v in sys.argv[1].split(","))
|
||||
out = sys.argv[2]
|
||||
tiles = []
|
||||
for tag in sys.argv[3:]:
|
||||
f = glob.glob(f"data/BREITHORN/images/{tag}*.jpg")[0]
|
||||
im = Image.open(f).convert("L").crop(box)
|
||||
im = im.point(lambda p: min(255, p * 3)) # même étirement pour toutes
|
||||
d = ImageDraw.Draw(im)
|
||||
d.text((5, 5), tag, fill=255)
|
||||
tiles.append(im)
|
||||
w, h = tiles[0].size
|
||||
cols = min(4, len(tiles))
|
||||
rows = (len(tiles) + cols - 1) // cols
|
||||
sheet = Image.new("L", (w * cols, h * rows))
|
||||
for i, t in enumerate(tiles):
|
||||
sheet.paste(t, ((i % cols) * w, (i // cols) * h))
|
||||
sheet.save(out)
|
||||
print(out)
|
||||
@@ -0,0 +1,26 @@
|
||||
"""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))
|
||||
@@ -0,0 +1,17 @@
|
||||
"""Température (sensor_thermal_deg_c) et tension aux heures de mesure (00,04,...,20 UTC), du 2026-10-14 au 2026-11-01."""
|
||||
import csv, glob
|
||||
def serie(name):
|
||||
out = {}
|
||||
for f in sorted(glob.glob(f"data/BREITHORN/metrics/BREITHORN_{name}_2026_1*.csv")):
|
||||
for r in csv.DictReader(open(f)):
|
||||
out[r["time_utc"][:13]] = r["metric"]
|
||||
return out
|
||||
T = serie("sensor_thermal_deg_c")
|
||||
V = serie("BusVoltage")
|
||||
days = sorted({k[:10] for k in T if "2026-10-14" <= k[:10] <= "2026-11-01"})
|
||||
print("jour " + " ".join(f"{h:02d}h" .rjust(6) for h in range(0, 24, 2)) + " min max Vmin")
|
||||
for d in days:
|
||||
vals = [T.get(f"{d} {h:02d}", "") for h in range(0, 24, 2)]
|
||||
day = [float(T[k]) for k in T if k.startswith(d) and T[k] != ""] or [0]
|
||||
vv = [float(V[k]) for k in V if k.startswith(d) and V[k] != ""]
|
||||
print(d + " " + " ".join(f"{v:>6}" for v in vals) + f" {min(day):5.1f} {max(day):5.1f} {min(vv) if vv else '':>5}")
|
||||
Reference in new issue
Block a user