Files
aimsight-labeling/auto/etiqueteur/FLORIDA_2026-10-01/outils/profil.py
T
maximeandClaude Opus 5.5 13cf28431f 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

18 lines
908 B
Python

"""Profil par heure du jour (médiane sur les jours du lot) de pan, tilt, scale et de la température."""
import csv, glob, statistics as st
from collections import defaultdict
from datetime import datetime
D='data/FLORIDA'; P=lambda s: datetime.fromisoformat(s[:16].replace(' ','T'))
h=defaultdict(lambda: defaultdict(list))
for f in sorted(glob.glob(f'{D}/camera/*.csv')):
for r in csv.DictReader(open(f)):
t=P(r['time_utc'])
if t.month==10:
for k in ('pan','tilt','scale'): h[t.hour][k].append(float(r['median_'+k]))
for f in sorted(glob.glob(f'{D}/metrics/FLORIDA_sensor_thermal_deg_c_*.csv')):
for r in csv.DictReader(open(f)):
t=P(r['time_utc'])
if t.month==10 and r['metric'] not in ('','nan'): h[t.hour]['T'].append(float(r['metric']))
for H in range(24):
print(H, ' '.join(f"{k}={st.median(h[H][k]):.5f}" for k in ('T','pan','tilt','scale')))