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,11 @@
|
||||
"""Max du matin (03-12h) et min de l'après-midi (12-21h) de la médiane des cibles corr_y, lissée sur 1 h.
|
||||
usage : vue.py --table --pas15 > f ; python3 extremes.py f"""
|
||||
import sys, statistics as st
|
||||
L = [l.split() for l in open(sys.argv[1]) if l[:2].isdigit()]
|
||||
s = [(l[0], l[1], float(l[3])) for l in L if l[3] != "-"]
|
||||
lis = [(d, h, st.median(v for _, _, v in s[max(0, i-2):i+3])) for i, (d, h, _) in enumerate(s)]
|
||||
for d in sorted({d for d, _, _ in lis}, key=lambda x: x[3:]+x[:2]):
|
||||
m = [x for x in lis if x[0] == d and "03:00" <= x[1] < "12:00"]
|
||||
n = [x for x in lis if x[0] == d and "12:00" <= x[1] < "21:00"]
|
||||
f = lambda x: f"{x[1]} {x[2]:+.3f}"
|
||||
print(d, "max matin", f(max(m, key=lambda x: x[2])) if m else "-", "| min aprem", f(min(n, key=lambda x: x[2])) if n else "-")
|
||||
Reference in new issue
Block a user