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,31 @@
|
||||
"""Per day and per target: max |corr - rolling median (+-4 meas, without it)| in own noises, split day (07-17 UTC) / night,
|
||||
and the count of exceedances > 5 noises. Accepted measurements only; skips the four train instants given."""
|
||||
import sys, statistics
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data
|
||||
W0, W1 = data.parse_time("2026-10-22T10:30Z"), data.parse_time("2026-11-01T00:00Z")
|
||||
skip = {data.parse_time(x) for x in sys.argv[1].split(",")} if len(sys.argv) > 1 else set()
|
||||
by = data.load("data/SNCF01")
|
||||
out = {}
|
||||
for s, ms in by.items():
|
||||
if ms[0]["pattern_type"] == "global_ref":
|
||||
continue
|
||||
for c in ("corr_x", "corr_y"):
|
||||
pts = [(m["t"].replace(second=0, microsecond=0), m[c]) for m in ms if W0 <= m["t"] <= W1 and m[c] is not None]
|
||||
pts = [p for p in pts if p[0] not in skip]
|
||||
if len(pts) < 50: continue
|
||||
v = [p[1] for p in pts]
|
||||
noise = statistics.median(abs(b - a) for a, b in zip(v, v[1:]))
|
||||
for i, (t, x) in enumerate(pts):
|
||||
nb = v[max(0, i-4):i] + v[i+1:i+5]
|
||||
dev = (x - statistics.median(nb)) / noise
|
||||
part = "day" if 7 <= t.hour < 17 else "night"
|
||||
key = (t.strftime("%m-%d"), part)
|
||||
o = out.setdefault(key, {})
|
||||
mx, n = o.get(s, (0, 0))
|
||||
o[s] = (max(mx, abs(dev)), n + (abs(dev) > 5))
|
||||
for key in sorted(out):
|
||||
o = out[key]
|
||||
tops = sorted(o.items(), key=lambda kv: -kv[1][1])[:6]
|
||||
tot = sum(n for _, (m, n) in o.items())
|
||||
print(key[0], key[1].ljust(5), "exceed>5:", str(tot).rjust(3), " ", ", ".join(f"{s} {n}x max{m:.0f}" for s, (m, n) in tops if n))
|
||||
@@ -0,0 +1,128 @@
|
||||
"""Builds labels.jsonl from work/existing.jsonl: kept labels unchanged (review kept), corrected ones rewritten
|
||||
(review dropped), removed ones left out, added ones appended. Ids are not written."""
|
||||
import json
|
||||
D = "labeling/auto/analyses/SNCF01_2026-10-22T1030_2026-11-01T0000"
|
||||
old = {d["id"]: d for d in map(json.loads, open(f"{D}/work/existing.jsonl"))}
|
||||
REMOVED = {"SNCF01-72", "SNCF01-94", "SNCF01-95"}
|
||||
|
||||
def shimmer(day, when_sun, targets, rejected, calm):
|
||||
return (f"By day ({day}), in the sun ({when_sun}): the corrected curves of the targets fluctuate from one measurement "
|
||||
f"to the next much more than at night, with one-measurement jumps that come back at once, above all {targets}; "
|
||||
f"{rejected} The recognition error of most sensors, the references included, varies strongly from one "
|
||||
f"measurement to the next, which it does not do at night nor on the overcast days (22/10, 26/10), when the "
|
||||
f"curves stay calm. {calm} Deduced cause: heat shimmer, the air heated by the sun above the tracks and the "
|
||||
f"ballast making the spots tremble (a fast noise over the whole scene, sunny hours only), not a nuisance seen "
|
||||
f"on the images. Do not trust the small movements of these curves by day; this is not a movement of the structure.")
|
||||
|
||||
NEW = {
|
||||
"SNCF01-71": dict(description=(
|
||||
"Daytime thermal cycle (22/10), over a few measurements between outages, under an overcast sky (13:30 and 14:00 "
|
||||
"images): the pan of the camera is low and its scale high until early afternoon, at their extreme at 13:30, then "
|
||||
"they begin to come back at the isolated 15:30 measurement, the tilt staying low. The corrected curves keep it: "
|
||||
"the corr_x of P5 and P7 and the corr_y of P6 stay clearly above their level of the previous evening all day, flat, "
|
||||
"and P7 starts to come back at 15:30, when the corrections of the references also shift a little. Deduced cause: "
|
||||
"the camera and its mount move with the heat of the day (camera pose), the compensation absorbing only part of it; "
|
||||
"the structure, a masonry wall, is not supposed to move like that. No temperature is available to confirm it. "
|
||||
"Normal, nothing to do.")),
|
||||
"SNCF01-74": dict(end="2026-10-25T13:15Z", description=shimmer(
|
||||
"25/10, from the resumption of the measurements", "sunny morning with passing clouds on the images of 09:00 to 13:00, sharp shadows on the wall",
|
||||
"CV.4, F4.2, F4.6, CV.9 and P1, and the noisy F4.3;",
|
||||
"CV.2 and CV.4 are rejected at times, their curves having gaps.",
|
||||
"The jumps stop after 13:00, when the sky clouds over (14:00 image).")),
|
||||
"SNCF01-76": dict(description=(
|
||||
"At night (25/10 23:45), for the time of one measurement, the CV targets (CV.1, CV.2, CV.4, CV.5, CV.8, CV.9) and "
|
||||
"F4.2 are rejected together, their curves are missing; the recognition error of the references BG.3.1 and R1 and "
|
||||
"of P5 and P7 rises without crossing the threshold, and P7, left under its threshold, jumps clearly in corr_x for "
|
||||
"that measurement: its point is wrong. The other targets do not move; everything comes back at the next "
|
||||
"measurement. Cause: probably a passage in front of this part of the scene, deduced from the signature (no image "
|
||||
"at that moment, the images being on the hour). The structure is not moving: point to ignore, nothing to do.")),
|
||||
"SNCF01-77": dict(description=(
|
||||
"Daytime thermal cycle (26/10), under an overcast sky (12:00 image): from the morning, the pan and the tilt of the "
|
||||
"camera drop and its scale rises, less than on the sunny days, with no return before the 22:00 outage: the pan "
|
||||
"keeps dropping in the evening. The corrected curves keep part of it: the corr_x of P7 and P5 move clearly away "
|
||||
"from their night level during the day, P7 most at 10:00 when the tilt drops at once; in the evening they move "
|
||||
"further, during the episode labelled separately (Visibility). 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.")),
|
||||
"SNCF01-79": dict(start="2026-10-26T15:15Z", description=(
|
||||
"In late afternoon and in the evening (26/10), from the resumption after the common gap of 15:00 until the 22:00 "
|
||||
"outage: the corr_x of P5 and P6 and the corr_y of P6 rise steadily and clearly, while the corr_y of P4, P3, P1 and "
|
||||
"the corr_x of P1 go down, instead of coming back as on the other evenings; the camera pose does not come back "
|
||||
"either (the pan drops, the scale rises again) and the registration residual is at its highest of the range. From "
|
||||
"17:00 the recognition error of the reference R2, of BG.3.1 and of P1, P3, CV.1, F4.2 rises markedly; F4.2 then "
|
||||
"CV.8 are rejected for a while, and at 18:15 most CV and F4 targets rise together. The night images of 16:00 to "
|
||||
"21:00 show nothing clear, the scene as on the night before. After the outage, on 28/10, the curves are back at "
|
||||
"their level. Cause not established: references less well seen (a visibility drop over the scene is likely) that "
|
||||
"skew the compensation. Do not trust the curves over the range.")),
|
||||
"SNCF01-81": dict(start="2026-10-28T08:00Z", end="2026-10-28T14:45Z", description=shimmer(
|
||||
"28/10", "full sun on the 12:00 image, sharp shadows on the wall",
|
||||
"CV.4 and CV.2, then P2, P3 and CV.1;",
|
||||
"CV.2 and CV.4 are rejected at times, their curves having gaps.",
|
||||
"The jumps start in mid-morning, once the sun is on the scene, and stop in mid-afternoon.")),
|
||||
"SNCF01-86": dict(start="2026-10-29T10:45Z", end="2026-10-29T15:30Z", description=shimmer(
|
||||
"29/10", "full sun on the 12:00 image, sharp shadows on the wall",
|
||||
"CV.4, F4.2, CV.6, BG.3 and BG.2;",
|
||||
"CV.2 and CV.4 are rejected at times, their curves having gaps.",
|
||||
"The jumps start late in the morning and stop in mid-afternoon.")),
|
||||
"SNCF01-87": dict(start="2026-10-29T07:45Z", description=(
|
||||
"Daytime thermal cycle (29/10), sunny day (12:00 image): from the morning, the pan and the tilt of the camera drop "
|
||||
"and its scale rises, then they slowly come back in the afternoon and the evening, the pan reaching its night level "
|
||||
"late in the evening. The corrected curves follow the same cycle, poorly compensated: the corr_y of P5 and P6 and "
|
||||
"the corr_x of P7, P6 and P5 move clearly away from their night level during the day, then come back gradually in "
|
||||
"the evening. 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.")),
|
||||
"SNCF01-90": dict(start="2026-10-30T09:15Z", end="2026-10-30T15:30Z", description=shimmer(
|
||||
"30/10", "full sun on the 12:00 image, sharp shadows on the wall",
|
||||
"CV.2, then F4.2, CV.6, F4.6, F4.5 and CV.4;",
|
||||
"CV.2 and CV.4 are rejected at times, their curves having gaps.",
|
||||
"The jumps start in mid-morning and stop in mid-afternoon.")),
|
||||
"SNCF01-93": dict(description=(
|
||||
"Two measurements, at night (30/10): at 21:30, CV.2 is rejected, its curve is missing; the recognition error of the "
|
||||
"reference BG.3.1 rises markedly without crossing its threshold, the camera pose jumps (pan), and P3 clearly, P1 and "
|
||||
"BG.3 a little, jump in corr_x for the time of the measurement. At 21:45, F4.2 is rejected alone, its curve is "
|
||||
"missing; everything then comes back. Cause: probably a passage in front of the bottom of the scene and the "
|
||||
"reference BG.3.1, deduced from the signature, weaker than that of the trains (no image at that moment, the images "
|
||||
"being on the hour). The structure is not moving: point to ignore, nothing to do.")),
|
||||
"SNCF01-96": dict(start="2026-10-31T08:15Z", end="2026-10-31T16:00Z", description=shimmer(
|
||||
"31/10", "full sun on the 12:00 and 13:00 images, sharp shadows on the wall",
|
||||
"CV.4, P2, CV.2 and P1, then BG.3 and F4.2;",
|
||||
"CV.2 and CV.4 are rejected at times, their curves having gaps.",
|
||||
"The jumps start in the morning and stop in late afternoon.")),
|
||||
"SNCF01-97": dict(description=(
|
||||
"Daytime thermal cycle (31/10), sunny day (12:00 and 13:00 images): from the morning, the pan and the tilt of the "
|
||||
"camera drop and its scale rises; at 12:30 the tilt also makes a step, labelled separately (Displacement). In the "
|
||||
"afternoon and the evening the pan and the scale come back slowly, the tilt only partly. The corrected curves follow "
|
||||
"the cycle, poorly compensated: the corr_y of P6, P5 and P4 and the corr_x of P7 and P5 move clearly away from their "
|
||||
"night level during the day; in the evening P7 comes back, but the corr_y of P6 and P5 stays clearly above its "
|
||||
"level of the previous nights until the end of the range. Deduced cause: the camera and its mount move with the "
|
||||
"heat of the day (camera pose), plus the step of the camera; the structure, a masonry wall, is not supposed to move "
|
||||
"like that. No temperature is available to confirm it. Normal, nothing to do; see the step of 12:30.")),
|
||||
}
|
||||
ADDED = [
|
||||
{"start": "2026-10-31T12:15Z", "end": "2026-10-31T12:45Z", "family": "Displacement", "description": (
|
||||
"Step of the camera at 12:30 on 31/10, in full sun (12:00 and 13:00 images): the tilt of the camera jumps at once, "
|
||||
"far more steeply than in its daily cycle, and all the sensors, references and targets, shift together in the image; the "
|
||||
"targets move relative to each other only a little. The compensation does not erase it all: "
|
||||
"the corr_y of P6, P7, P5 and P3 steps up clearly at that measurement and stays there all afternoon. The tilt does "
|
||||
"not come back to its earlier night level, and the corr_y of P6 and P5 stays clearly above its level of the "
|
||||
"previous nights until the end of the range; at 17:00 the corrections of the references BG.3.1, R1 and R2 also "
|
||||
"shift relative to each other and stay. Cause not established (the camera or its mount moving in the sun is "
|
||||
"likely). It is not a movement of the structure; the camera is to be monitored, and the level of the following "
|
||||
"nights checked.")},
|
||||
]
|
||||
out = []
|
||||
for i, d in old.items():
|
||||
if i in REMOVED:
|
||||
continue
|
||||
if i in NEW:
|
||||
d = {k: v for k, v in d.items() if k not in ("id", "review")}
|
||||
d.update(NEW[i])
|
||||
else:
|
||||
d = {k: v for k, v in d.items() if k != "id"}
|
||||
out.append(d)
|
||||
out += ADDED
|
||||
out.sort(key=lambda d: (d["start"], d["end"]))
|
||||
with open(f"{D}/labels.jsonl", "w") as f:
|
||||
for d in out:
|
||||
f.write(json.dumps({k: d[k] for k in ("start", "end", "family", "description", "review") if k in d}) + "\n")
|
||||
print(len(out), "labels")
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Per-instant table: pose + corr of chosen sensors minus a reference night level (in own noises).
|
||||
usage: table.py START END SENSORS [every_n]"""
|
||||
import sys, statistics
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data
|
||||
from datetime import timedelta
|
||||
S, E = data.parse_time(sys.argv[1]), data.parse_time(sys.argv[2])
|
||||
sens = sys.argv[3].split(",")
|
||||
every = int(sys.argv[4]) if len(sys.argv) > 4 else 1
|
||||
by = data.load("data/SNCF01")
|
||||
cam = {p["t"]: p for p in data.load_camera("data/SNCF01")}
|
||||
W0, W1 = data.parse_time("2026-10-22T10:30Z"), data.parse_time("2026-11-01T00:00Z")
|
||||
lvl, noi = {}, {}
|
||||
for s in sens:
|
||||
for c in ("corr_x", "corr_y"):
|
||||
v = [m[c] for m in by[s] if W0 <= m["t"] <= W1 and m[c] is not None]
|
||||
d = [abs(b - a) for a, b in zip(v, v[1:])]
|
||||
noi[s, c] = statistics.median(d)
|
||||
# level: median of night measurements 00-05 UTC in window
|
||||
n = [m[c] for m in by[s] if W0 <= m["t"] <= W1 and m[c] is not None and m["t"].hour < 5]
|
||||
lvl[s, c] = statistics.median(n)
|
||||
ts = sorted({m["t"] for m in by[sens[0]] if S <= m["t"] <= E})
|
||||
hdr = "time pan*1e3 tilt*1e3 rot*1e3 scl*1e6 | " + " ".join(f"{s}.x {s}.y" for s in sens)
|
||||
print(hdr)
|
||||
idx = {s: {m["t"]: m for m in by[s]} for s in sens}
|
||||
for i, t in enumerate(ts):
|
||||
if i % every: continue
|
||||
p = cam.get(t.replace(second=0, microsecond=0))
|
||||
ps = " ".join(f"{p[k]*f:7.2f}" for k, f in (("pan",1e3),("tilt",1e3),("rotation",1e3),("scale",1e6))) if p else " no pose"
|
||||
if p: ps = ps[:-7] + f"{(p['scale']-1)*1e6:7.0f}"
|
||||
cells = []
|
||||
for s in sens:
|
||||
m = idx[s].get(t)
|
||||
for c in ("corr_x", "corr_y"):
|
||||
v = m[c] if m else None
|
||||
cells.append(" r " if v is None else f"{(v-lvl[s,c])/noi[s,c]:+5.0f}")
|
||||
print(t.strftime("%d %H:%M"), ps, "|", " ".join(cells))
|
||||
Reference in new issue
Block a user