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,37 @@
|
||||
"""Bornes du cycle thermique de chaque jour (UTC) : heures où la pose (pan) s'écarte de son niveau de la nuit,
|
||||
et où la médiane des cibles de |corr_x - niveau de nuit| dépasse un seuil. Nuit = 02:00-10:00 UTC (nuit locale).
|
||||
usage: thermique.py"""
|
||||
import csv, glob, sys, statistics as st
|
||||
sys.path.insert(0, 'labeling/auto/etiqueteur/NIEDERHORN_2026-10-01/outils')
|
||||
from table import charge
|
||||
|
||||
pan = {}
|
||||
for f in glob.glob('data/NIEDERHORN/camera/NIEDERHORN_camera_2026*.csv'):
|
||||
with open(f) as fh:
|
||||
for r in csv.DictReader(fh):
|
||||
t = r['time_utc'][:13].replace(' ', 'T') + ':00Z'
|
||||
pan[t] = (float(r['median_pan']), float(r['median_tilt']))
|
||||
rows = charge('2026-09-30T00:00Z', '2026-11-01T23:00Z')
|
||||
cx = {}
|
||||
for r in rows:
|
||||
if r['pattern_type'] != 'global_ref' and r['corr_x'] != '':
|
||||
cx.setdefault(r['sensor_name'], {})[r['t']] = float(r['corr_x'])
|
||||
TH_PAN, TH_C = 0.006, 0.08
|
||||
for d in range(1, 32):
|
||||
j = f'2026-10-{d:02d}'
|
||||
nuit = [pan[t][0] for t in pan if t.startswith(j) and '02' <= t[11:13] <= '10']
|
||||
if not nuit:
|
||||
print(j, 'pas de nuit'); continue
|
||||
n0 = st.median(nuit)
|
||||
hp = [t[11:13] for t in sorted(pan) if t.startswith(j) and abs(pan[t][0] - n0) > TH_PAN]
|
||||
hc = []
|
||||
for h in range(24):
|
||||
t = f'{j}T{h:02d}:00Z'
|
||||
devs = []
|
||||
for c, s in cx.items():
|
||||
nn = [s[u] for u in s if u.startswith(j) and '02' <= u[11:13] <= '10']
|
||||
if len(nn) >= 3 and t in s:
|
||||
devs.append(abs(s[t] - st.median(nn)))
|
||||
if len(devs) >= 8 and st.median(devs) > TH_C:
|
||||
hc.append(f'{h:02d}')
|
||||
print(j, 'pan>', ','.join(hp), '| corr>', ','.join(hc))
|
||||
Reference in new issue
Block a user