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>
This commit is contained in:
1 parent
c779de7720
commit
ddb17c2189
321 files changed
+18464
-3426
No files matched your search
@@ -0,0 +1,107 @@
|
||||
"""Builds labels.jsonl: kept labels copied verbatim from work/existing.jsonl (without id), corrected ones rewritten."""
|
||||
import json, sys
|
||||
O = sys.argv[1]
|
||||
old = {json.loads(l)["id"]: json.loads(l) for l in open(f"{O}/work/existing.jsonl")}
|
||||
KEEP = [9, 10, 12, 18, 19, 20, 21, 22, 23, 25, 26, 33, 35, 37]
|
||||
SH = ("Deduced cause: heat shimmer, the air heated by the sun above the tracks and the ballast, which makes the spots "
|
||||
"tremble (a fast noise, by day only, with the recognition error of these low targets rising), nothing in front "
|
||||
"of the targets on the images. Do not trust the small movements of these curves over the range; this is not a "
|
||||
"movement of the structure.")
|
||||
new = {
|
||||
8: ("2026-10-04T08:45Z", "2026-10-04T16:30Z", "Visibility",
|
||||
"By day (04/10), sunny day (cast shadows on the wall on the image of 12:00): the corrected curves of the low targets "
|
||||
"fluctuate from one measurement to the next beyond their noise, mostly CV.4 (corr_x and corr_y), F4.2, BG.2, BG.3, with "
|
||||
"one-measurement jumps that come back at once; late in the morning, BG.3, F4.2, BG.2 and the P targets jump together in "
|
||||
"corr_x for one measurement; CV.2 and CV.4 are rejected at times (missing points). At night everything is calm again. " + SH),
|
||||
11: ("2026-10-05T07:00Z", "2026-10-05T15:15Z", "Visibility",
|
||||
"By day (05/10), sunny day (cast shadows on the image of 12:00): the corrected curves of the low targets fluctuate from "
|
||||
"one measurement to the next beyond their noise, the most strongly of the batch: CV.4 and CV.2 in both columns, F4.2, "
|
||||
"BG.3, and in late morning the corr_y of P1, P2, P3 jump together for one or two measurements; CV.2, CV.4 and F4.2 are "
|
||||
"rejected at times (missing points). Calm again before nightfall; the train of 16:00 is labelled apart. " + SH),
|
||||
14: ("2026-10-06T07:00Z", "2026-10-06T13:15Z", "Visibility",
|
||||
"By day (06/10), sunny morning (cast shadows on the image of 12:00): the corrected curves of the low targets fluctuate "
|
||||
"beyond their noise, mostly CV.4 in corr_x, F4.2 in both columns and CV.2, with one-measurement jumps that come back at "
|
||||
"once; CV.2 and CV.4 are rejected at times (missing points). The other targets stay within their noise; calm again from "
|
||||
"early afternoon. " + SH),
|
||||
15: ("2026-10-06T07:15Z", "2026-10-07T03:00Z", "Thermal displacement",
|
||||
"Daytime thermal cycle (06/10), sunny day (cast shadows on the image of 12:00): from the morning, the pan and the tilt of "
|
||||
"the camera drop strongly and its scale rises, until early afternoon; they come back slowly in the afternoon, the evening "
|
||||
"and the first half of the night. The compensation absorbs only part of it: corr_x of P7 rises clearly, with corr_y of "
|
||||
"P6 and P7, while corr_x of P1 drops and that of P5 rises; the curves come back to their night level late in the evening, "
|
||||
"the pose in the night. Deduced cause: the camera and its mount move with the heat of the day (camera pose); the "
|
||||
"structure, a masonry wall, is not supposed to move like that. No temperature is available to confirm it. Normal, "
|
||||
"nothing to do."),
|
||||
16: ("2026-10-07T07:30Z", "2026-10-08T04:15Z", "Thermal displacement",
|
||||
"Weak daytime thermal cycle (07/10), overcast day (image of 12:00): in the morning, the pan and the tilt of the camera "
|
||||
"drop a little and its scale rises a little, then the camera stays in that position all afternoon; it comes back in the "
|
||||
"evening and all night, beyond its position of the previous night, until early on the 8th. The corrected curves follow, "
|
||||
"less than on the sunny days: corr_x of P5 and P7 rises, corr_y of P7 and P6 too, corr_x of P1 drops; P7 comes back late "
|
||||
"in the evening, P5 only after midnight. The three train passages of the day (13:00, 16:00, 19:45) are labelled apart. "
|
||||
"Deduced cause: the camera and its mount move with the heat of the day (camera pose); the structure, a masonry wall, is "
|
||||
"not supposed to move like that. No temperature is available to confirm it. Normal, nothing to do."),
|
||||
17: ("2026-10-07T12:45Z", "2026-10-07T13:15Z", "Obstruction",
|
||||
"One single measurement: most targets (the CV, the F4 except F4.5 and F4.6, and all the P) are rejected and their curves "
|
||||
"are missing; the references are affected too (R1 rejected, BG.3.1 just under its threshold and left out), the "
|
||||
"compensation retains none of them; the targets that stayed under the threshold jump a little beyond their noise, BG.3 in "
|
||||
"corr_x, F4.5 and F4.6 in corr_y. Everything comes back at the next measurement. Cause seen: a train passing in front of "
|
||||
"the wall and the targets, blurred, on the image of 13:00. The structure is not moving: point to ignore, nothing to do."),
|
||||
27: ("2026-10-10T07:00Z", "2026-10-10T13:00Z", "Visibility",
|
||||
"By day (10/10), sunny morning (cast shadows on the image of 12:00): the corrected curves of the low targets fluctuate "
|
||||
"beyond their noise, mostly CV.4 in both columns, CV.9 and CV.2 in corr_y, F4.2 and F4.5, and in mid-morning BG.3, P2, "
|
||||
"P3 jump together in corr_x for one measurement; they come back at once. Calm again from early afternoon. " + SH),
|
||||
28: ("2026-10-11T10:00Z", "2026-10-11T15:30Z", "Visibility",
|
||||
"By day (11/10), overcast day (image of 12:00), the weakest agitation of the batch that still crosses the noise: CV.4 in "
|
||||
"corr_y, F4.2, CV.2, and P1, P2 in corr_y make a few one-measurement jumps just beyond their noise, coming back at once; "
|
||||
"the train of 14:15 is labelled apart. Calm at night. Deduced cause: a weak shimmer of the air above the tracks by day, "
|
||||
"the same signature as on the sunny days, much weaker; nothing in front of the targets on the images. Do not trust the "
|
||||
"small movements of these curves over the range; this is not a movement of the structure."),
|
||||
29: ("2026-10-11T08:30Z", "2026-10-12T02:45Z", "Thermal displacement",
|
||||
"Daytime thermal cycle (11/10), overcast day (image of 12:00): from the morning, the pan and the tilt of the camera drop "
|
||||
"and its scale rises, until early afternoon; they come back in the late afternoon, the evening and the first half of the "
|
||||
"night, beyond their position of the previous night. The compensation absorbs part of it: corr_x of P7 rises clearly, "
|
||||
"with corr_y of P6 and P5, while corr_x of P1 drops; the curves are back at their night level in the evening, the pose in "
|
||||
"the night. The train of 14:15 is labelled apart. Deduced cause: the camera and its mount move with the heat of the day "
|
||||
"(camera pose); the structure, a masonry wall, is not supposed to move like that. No temperature is available to confirm "
|
||||
"it. Normal, nothing to do."),
|
||||
30: ("2026-10-11T14:00Z", "2026-10-11T14:30Z", "Obstruction",
|
||||
"One single measurement: most targets (the CV, the F4 and all the P) are rejected and their curves are missing; the "
|
||||
"references are affected too (BG.3.1 and R1 rejected), the compensation retains none of them, and the targets that "
|
||||
"stayed under the threshold, BG.2, BG.3 and F4.5, jump strongly in corr_x and corr_y for the time of the measurement. "
|
||||
"Everything comes back at the next measurement. Cause: a passage in front of the targets and the references; the camera "
|
||||
"takes its image on the hour, none at that measurement; deduced from the signature, the same as that of the trains seen "
|
||||
"on the images of the other passages. The structure is not moving: point to ignore, nothing to do."),
|
||||
31: ("2026-10-12T06:30Z", "2026-10-12T07:00Z", "Obstruction",
|
||||
"One single measurement, early in the morning: CV.8 and F4.2 go above their threshold (CV.6 too), their curves are "
|
||||
"missing, and the recognition error of most CV and F4 targets and of the reference BG.3.1 rises; CV.4, left under its "
|
||||
"threshold with its recognition error dropping, jumps clearly in corr_x for that measurement, and comes back at the next "
|
||||
"one. The references hold, the other targets stay within their noise. Cause deduced from the signature: a partial passage "
|
||||
"in front of the low targets, CV.4 latching onto a light or a reflection; no image at that measurement (the camera takes "
|
||||
"one on the hour). The structure is not moving: point to ignore, nothing to do."),
|
||||
32: ("2026-10-12T07:30Z", "2026-10-12T14:45Z", "Visibility",
|
||||
"By day (12/10), sunny day (cast shadows on the image of 12:00): the corrected curves of the low targets fluctuate beyond "
|
||||
"their noise, mostly CV.4 in both columns, F4.2, CV.2, F4.5, F4.6, and in mid-morning BG.3, F4.2, F4.6, P2, P3, P4, P6 "
|
||||
"jump together in corr_x for one measurement; they come back at once; CV.2 and CV.4 are rejected at times (missing "
|
||||
"points). Calm again in the afternoon. " + SH),
|
||||
34: ("2026-10-12T15:45Z", "2026-10-12T16:15Z", "Obstruction",
|
||||
"One single measurement: most targets (the CV, the F4 and all the P) are rejected and their curves are missing; the "
|
||||
"references are affected too (BG.3.1 and R1 rejected), the compensation retains none of them, and the targets that "
|
||||
"stayed under the threshold, BG.2, BG.3 and F4.5, jump strongly in corr_x and corr_y for the time of the measurement. "
|
||||
"Everything comes back at the next measurement. Cause seen: a train passing in front of the wall and the targets, "
|
||||
"blurred, on the image of 16:00. The structure is not moving: point to ignore, nothing to do."),
|
||||
36: ("2026-10-13T07:45Z", "2026-10-13T14:00Z", "Visibility",
|
||||
"By day (13/10), sun and clouds (image of 12:00): the corrected curves of the low targets fluctuate beyond their noise, "
|
||||
"mostly CV.4 in corr_x, F4.2, F4.6, CV.2, and around midday P1, P2 and F4.2 jump together in corr_x for one measurement; "
|
||||
"they come back at once. Calm again in the afternoon. " + SH),
|
||||
}
|
||||
out = []
|
||||
for i in sorted(KEEP + list(new)):
|
||||
if i in KEEP:
|
||||
d = dict(old[f"SNCF01-{i}"]); d.pop("id")
|
||||
else:
|
||||
s, e, f, desc = new[i]
|
||||
d = {"start": s, "end": e, "family": f, "description": desc}
|
||||
out.append(d)
|
||||
with open(f"{O}/labels.jsonl", "w") as fh:
|
||||
for d in out:
|
||||
fh.write(json.dumps(d, ensure_ascii=False) + "\n")
|
||||
print(len(out))
|
||||
@@ -0,0 +1,55 @@
|
||||
"""Per day and per target: fast deviation (rolling ±4 median) and slow deviation (smoothed 5, against the previous
|
||||
night level 20-03 UTC), in own noises (median |diff| over the window), with the instants of the extremes.
|
||||
Usage: python3 daily.py data/SNCF01 START END [exclude_instants_comma]"""
|
||||
import sys, statistics
|
||||
from datetime import timedelta
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data, common
|
||||
|
||||
folder, start, end = sys.argv[1], data.parse_time(sys.argv[2]), data.parse_time(sys.argv[3])
|
||||
excl = set(sys.argv[4].split(",")) if len(sys.argv) > 4 else set()
|
||||
by = data.load(folder)
|
||||
SKIP = {"BG.1", "F4.1"}
|
||||
out = []
|
||||
for s, ms in by.items():
|
||||
if data.is_reference(ms) or s in SKIP:
|
||||
continue
|
||||
for col in ("corr_x", "corr_y"):
|
||||
ser = [(m["t"], m[col]) for m in ms if start - timedelta(hours=12) <= m["t"] <= end and m[col] is not None
|
||||
and data.iso(m["t"]) not in excl]
|
||||
win = [v for t, v in ser if t >= start]
|
||||
if len(win) < 10:
|
||||
continue
|
||||
noise = common.own_noise(win)
|
||||
if not noise:
|
||||
continue
|
||||
vals = [v for _, v in ser]
|
||||
days = {}
|
||||
for i, (t, v) in enumerate(ser):
|
||||
if t < start:
|
||||
continue
|
||||
nb = vals[max(0, i - 4):i] + vals[i + 1:i + 5]
|
||||
fast = (v - statistics.median(nb)) / noise if nb else 0
|
||||
sm = statistics.median(vals[max(0, i - 2):i + 3])
|
||||
d = t.date()
|
||||
days.setdefault(d, []).append((t, fast, sm))
|
||||
# night level: 20-03 before each day
|
||||
for d, rows in sorted(days.items()):
|
||||
n0 = [v for t, v in ser if (t.date() == d - timedelta(days=1) and t.hour >= 20) or (t.date() == d and t.hour < 3)]
|
||||
lvl = statistics.median(n0) if n0 else None
|
||||
fmax = max(rows, key=lambda r: abs(r[1]))
|
||||
nfast = sum(1 for r in rows if abs(r[1]) > 5)
|
||||
if lvl is not None:
|
||||
smax = max(rows, key=lambda r: abs(r[2] - lvl))
|
||||
sdev = (smax[2] - lvl) / noise
|
||||
exc = [r[0] for r in rows if abs(r[2] - lvl) / noise > 5]
|
||||
else:
|
||||
smax, sdev, exc = (None,), 0, []
|
||||
out.append((str(d), s, col, noise, fmax[1], data.iso(fmax[0])[11:16], nfast, sdev,
|
||||
data.iso(smax[0])[11:16] if smax[0] else "-",
|
||||
data.iso(exc[0])[11:16] if exc else "-", data.iso(exc[-1])[11:16] if exc else "-",
|
||||
(data.load_targets(folder).get(s) or {}).get("mm_per_px")))
|
||||
for r in sorted(out):
|
||||
k = r[11] or 0
|
||||
print(f"{r[0]} {r[1]:6} {r[2]:6} noise {r[3]:.4f} ({r[3]*k:.3f}mm) fastmax {r[4]:+6.1f}@{r[5]} n>5 {r[6]:3d} "
|
||||
f"slow {r[7]:+6.1f}@{r[8]} ({r[7]*r[3]*k:+.2f}mm) exc {r[9]}-{r[10]}")
|
||||
@@ -0,0 +1,25 @@
|
||||
"""Instants where a target's corr deviates >K own noises from its rolling ±4 median (passages excluded), per day,
|
||||
with the targets, to bound the daytime agitation. Usage: fast_instants.py folder START END EXCL K"""
|
||||
import sys, statistics
|
||||
from datetime import timedelta
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data, common
|
||||
folder, start, end = sys.argv[1], data.parse_time(sys.argv[2]), data.parse_time(sys.argv[3])
|
||||
excl = set(sys.argv[4].split(",")); K = float(sys.argv[5])
|
||||
TI = {"BG.1", "F4.1", "CV.6", "CV.7", "F4.3", "F4.4"}
|
||||
by = data.load(folder)
|
||||
hits = {}
|
||||
for s, ms in by.items():
|
||||
if data.is_reference(ms) or s in TI:
|
||||
continue
|
||||
for col in ("corr_x", "corr_y"):
|
||||
ser = [(m["t"], m[col]) for m in ms if start <= m["t"] <= end and m[col] is not None and data.iso(m["t"]) not in excl]
|
||||
vals = [v for _, v in ser]
|
||||
noise = common.own_noise(vals)
|
||||
for i, (t, v) in enumerate(ser):
|
||||
nb = vals[max(0, i - 4):i] + vals[i + 1:i + 5]
|
||||
dv = (v - statistics.median(nb)) / noise
|
||||
if abs(dv) > K:
|
||||
hits.setdefault(t, []).append(f"{s}{col[-1]}{dv:+.1f}")
|
||||
for t in sorted(hits):
|
||||
print(data.iso(t), len(hits[t]), " ".join(hits[t]))
|
||||
@@ -0,0 +1,42 @@
|
||||
"""Per day: first instant (after 05:00) where a target's smoothed corr (median of 5) leaves the previous night level
|
||||
(01:00-05:00) by > 5 own noises, and last instant (before next 06:00) where it is still > 5 noises from the next
|
||||
night level; per target. Passages excluded. Usage: thermal_bounds.py folder EXCL"""
|
||||
import sys, statistics
|
||||
from datetime import timedelta, datetime, timezone
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data, common
|
||||
folder = sys.argv[1]; excl = set(sys.argv[2].split(","))
|
||||
TI = {"BG.1", "F4.1", "CV.6", "CV.7", "F4.3", "F4.4"}
|
||||
by = data.load(folder)
|
||||
S, E = data.parse_time("2026-10-03T00:00Z"), data.parse_time("2026-10-14T12:00Z")
|
||||
res = {}
|
||||
for s, ms in by.items():
|
||||
if data.is_reference(ms) or s in TI: continue
|
||||
for col in ("corr_x", "corr_y"):
|
||||
ser = [(m["t"], m[col]) for m in ms if S <= m["t"] <= E and m[col] is not None and data.iso(m["t"]) not in excl]
|
||||
vals = [v for _, v in ser]
|
||||
noise = common.own_noise(vals)
|
||||
sm = [(t, statistics.median(vals[max(0, i-2):i+3])) for i, (t, _) in enumerate(ser)]
|
||||
def night(d):
|
||||
v = [x for t, x in ser if t.date() == d and 1 <= t.hour < 5]
|
||||
return statistics.median(v) if v else None
|
||||
for k in range(4, 15):
|
||||
d = datetime(2026, 10, k, tzinfo=timezone.utc).date()
|
||||
n0, n1 = night(d), night(d + timedelta(days=1))
|
||||
if n0 is None: continue
|
||||
seg = [(t, x) for t, x in sm if t.date() == d and t.hour >= 5]
|
||||
st = next((t for t, x in seg if abs(x - n0) / noise > 5), None)
|
||||
seg2 = [(t, x) for t, x in sm if (t.date() == d and t.hour >= 10) or (t.date() == d + timedelta(days=1) and t.hour < 6)]
|
||||
en = None
|
||||
if n1 is not None:
|
||||
for t, x in seg2:
|
||||
if abs(x - n1) / noise > 5: en = t
|
||||
mx = max((abs(x - n0) / noise for t, x in seg), default=0)
|
||||
res.setdefault(str(d), []).append((s + col[-1], st, en, mx))
|
||||
for d in sorted(res):
|
||||
rows = sorted(res[d], key=lambda r: -r[3])[:8]
|
||||
sts = [r[1] for r in res[d] if r[1] and r[3] > 8]
|
||||
ens = [r[2] for r in res[d] if r[2] and r[3] > 8]
|
||||
print(d, "first", data.iso(min(sts)) if sts else "-", "last", data.iso(max(ens)) if ens else "-")
|
||||
for r in rows:
|
||||
print(" ", r[0], data.iso(r[1])[5:16] if r[1] else "-", data.iso(r[2])[5:16] if r[2] else "-", f"{r[3]:.1f}")
|
||||
Reference in new issue
Block a user