- 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>
28 lines
1.2 KiB
Python
28 lines
1.2 KiB
Python
"""Per label: largest deviation (in noises) of a target's corr_x/corr_y, from a ranges.py output.
|
|
usage: requal_measure.py <ranges.txt> <labels.jsonl> [--inclusive]"""
|
|
import json, sys, re
|
|
REFS = {'8002','8004','8011','8012','8013','8014','8017','8019','92H'}
|
|
txt, lab = sys.argv[1], sys.argv[2]
|
|
incl = '--inclusive' in sys.argv
|
|
rng = [] # (col, sensor, start, end, n, val, noises, at, rej)
|
|
col = None
|
|
for line in open(txt):
|
|
m = re.match(r'^(corr_x|corr_y): ranges', line)
|
|
if m: col = m.group(1); continue
|
|
if line.startswith('=='): col = None; continue
|
|
if col:
|
|
p = line.split()
|
|
if len(p) >= 8 and re.match(r'\d{4}-', p[1]):
|
|
rng.append((col, p[0], p[1], p[2], int(p[3]), p[4], float(p[5]), p[6], p[7]))
|
|
for l in open(lab):
|
|
d = json.loads(l); s, e = d['start'], d['end']
|
|
hits = []
|
|
for r in rng:
|
|
if r[1] in REFS: continue
|
|
ok = (r[2] <= e and r[3] >= s) if incl else (r[2] < e and r[3] > s)
|
|
if ok: hits.append(r)
|
|
hits.sort(key=lambda r: -abs(r[6]))
|
|
top = ', '.join(f"{r[1]} {r[0][-1]} {r[6]:+.1f}@{r[7][11:16]}" for r in hits[:5])
|
|
mx = abs(hits[0][6]) if hits else 0
|
|
print(f"{d.get('id','?'):14s} {s[5:]} {e[5:]} {d['family'][:12]:12s} max={mx:6.1f} n={len(hits):3d} | {top}")
|