- 32 analyses: each label kept, rewritten or removed by its analyst (section Requalification of the report; mm magnitudes where the targets have them) - SNCF01 x3, WILDSTRUBEL 2026-09-01 -> 2026-10-06 x3: verified from their existing labels under the new rules - long labels (no analysis): auto/analyses/long-labels/<STATION>/; NORDEND-169 and -195 run to 07/11, so NORDEND-283 and -284 (their continuation) are removed - reading-rules.md, stations.md: the citations of removed or rewritten labels point to their successor, or to [expert] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
1.1 KiB
Python
25 lines
1.1 KiB
Python
"""Hourly median of chosen target columns, in own noises, relative to a level window. usage: start end lvl_start lvl_end sensor:col ..."""
|
|
import sys, statistics
|
|
from datetime import timedelta
|
|
sys.path.insert(0, 'tools/scripts')
|
|
from data import load, parse_time
|
|
from common import own_noise
|
|
s, e, l0, l1 = map(parse_time, sys.argv[1:5])
|
|
by = load('data/LENZSPITZE')
|
|
specs = [a.split(':') for a in sys.argv[5:]]
|
|
B0, B1 = parse_time('2026-10-23T23:55Z'), parse_time('2026-11-01T11:40Z')
|
|
cols = []
|
|
for name, c in specs:
|
|
ms = by[name]
|
|
noise = own_noise([m[c] for m in ms if B0 <= m['t'] <= B1 and m[c] is not None])
|
|
lvl = statistics.median([m[c] for m in ms if l0 <= m['t'] < l1 and m[c] is not None])
|
|
cols.append((name, c, ms, noise, lvl))
|
|
print('hour ' + ' '.join(f"{n}{c[-1]:>1}".rjust(8) for n, c, *_ in cols))
|
|
h = s
|
|
while h < e:
|
|
row = []
|
|
for n, c, ms, noise, lvl in cols:
|
|
v = [m[c] for m in ms if h <= m['t'] < h + timedelta(hours=1) and m[c] is not None]
|
|
row.append(f"{(statistics.median(v)-lvl)/noise:8.1f}" if len(v) >= 4 else ' -')
|
|
print(f"{h:%m-%d %H}h " + ' '.join(row)); h += timedelta(hours=1)
|