Files
aimsight-labeling/auto/analyses/FLORIDA_2026-10-01T0000_2026-10-11T0945/scripts/requal.py
T
maximeandClaude Opus 5.5 ddb17c2189 auto: labels requalified under the 5-noise rules (only what stands out from the noise): 32 analyses refined, the 6 paused periods verified, the long labels requalified with the fixes the period analysts found; 1153 -> 961 labels
- 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>
2026-11-17 23:58:00 +01:00

25 lines
1.1 KiB
Python

"""Max deviation (in noises) of the real targets within each label, from ranges.py outputs."""
import json, re, sys
from datetime import datetime
T = ["Massif 2", "Sellette 4", "Sellette 5", "Sellette 6"]
def p(s): return datetime.strptime(s, "%Y-%m-%dT%H:%MZ")
def parse(f):
out, col = [], None
for l in open(f):
m = re.match(r"(corr_[xy]): ranges", l)
if m: col = m.group(1); continue
if col is None: continue
for t in T:
if l.startswith(t + " ") or l.startswith(t + "2"):
d = re.findall(r"\d{4}-\d\d-\d\dT\d\d:\d\dZ", l)
if len(d) < 3: continue
rest = l[len(t):].split()
out.append((t, col, p(d[0]), p(d[1]), float(rest[4]), d[2]))
return out
rs = parse(sys.argv[2])
for l in open(sys.argv[1]):
L = json.loads(l); a, b = p(L["start"]), p(L["end"])
hits = [r for r in rs if r[2] <= b and r[3] >= a]
best = sorted(hits, key=lambda r: -abs(r[4]))[:4]
print(L["id"], L["start"], L["end"], L["family"][:10], " | ".join(f"{t} {c} {v:+.1f}@{x[11:16]}" for t, c, _, _, v, x in best) or "none")