- 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>
33 lines
1.4 KiB
Python
33 lines
1.4 KiB
Python
"""Deviation of each target, in its own noise (ranges.py full-range noise),
|
|
from a reference level (median of chosen instants), over the instants of a label.
|
|
Reads the per-instant tables work/corr_x.txt, work/corr_y.txt written by table.py."""
|
|
import re, statistics, sys
|
|
D = sys.argv[1]
|
|
ref = sys.argv[2].split(',') # reference instants 'MM-DD HH:MM'
|
|
span = sys.argv[3].split('/') # 'MM-DD HH:MM/MM-DD HH:MM'
|
|
noise = {}
|
|
col = None
|
|
for line in open(f"{D}/work/requal/full.txt"):
|
|
if line.startswith('== corr_x'): col = 'corr_x'
|
|
elif line.startswith('== corr_y'): col = 'corr_y'
|
|
m = re.match(r'^(\S+)\s+52\s+\S+\s+(\S+)\s', line)
|
|
if col and m and not m.group(1).startswith('REF'):
|
|
noise[(col, m.group(1))] = float(m.group(2))
|
|
for c in ('corr_x', 'corr_y'):
|
|
rows = [l.rstrip('\n') for l in open(f"{D}/work/{c}.txt")]
|
|
head = rows[0].split()[1:13]
|
|
data = {}
|
|
for r in rows[1:]:
|
|
p = r.split()
|
|
if len(p) < 14: continue
|
|
t = p[0] + ' ' + p[1]
|
|
try: data[t] = [float(v) for v in p[2:14]]
|
|
except ValueError: pass
|
|
times = sorted(data)
|
|
sel = [t for t in times if span[0] <= t <= span[1]]
|
|
print(f"== {c} reference {ref}")
|
|
print('time ' + ' '.join(f"{h:>7}" for h in head))
|
|
lev = [statistics.median(data[t][i] for t in ref if t in data) for i in range(12)]
|
|
for t in sel:
|
|
print(t + ' ' + ' '.join(f"{(data[t][i]-lev[i])/noise[(c, head[i])]:7.1f}" for i in range(12)))
|