- 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>
129 lines
10 KiB
Python
129 lines
10 KiB
Python
"""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")
|