Après l'audit du scan du 2026-11-06 : error_value des capteurs acceptés, 12 capteurs nommés, consignes du scanner (passage non couvert, doublon gardé, image par doute de famille) ; outils/ : non_couverts.py par capteur, rejets_instants.py, ev_fenetres.py, horaire_jours.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d5ee63a118
commit
7e24df09a0
6 files changed
+93
-36
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# Médiane horaire d'une colonne pour quelques capteurs, sur plusieurs jours (STATION COL CAPTEUR[,CAPTEUR] J0 J1 [H0 H1]) : le même motif revient-il chaque jour ?
|
||||
import statistics, sys
|
||||
from datetime import datetime, timezone
|
||||
import os
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) # outils.py, à côté
|
||||
from outils import station
|
||||
nom, col, caps, j0, j1 = sys.argv[1:6]
|
||||
h0, h1 = (int(x) for x in sys.argv[6:8]) if len(sys.argv) > 7 else (0, 24)
|
||||
m, _ = station(nom)
|
||||
for s in caps.split(","):
|
||||
par = {}
|
||||
for x in m[s]:
|
||||
j = x["t"].strftime("%m-%d")
|
||||
if j0 <= j <= j1 and h0 <= x["t"].hour < h1 and x[col] is not None:
|
||||
par.setdefault(j, {}).setdefault(x["t"].hour, []).append(x[col])
|
||||
print(s, col, "heures", h0, "à", h1 - 1)
|
||||
for j in sorted(par):
|
||||
print(" ", j, " ".join(f"{statistics.median(par[j][h]):+.3f}" if h in par[j] else " - " for h in range(h0, h1)))
|
||||
Reference in new issue
Block a user