"""Write labels.jsonl: kept labels copied verbatim from work/existing.jsonl (id removed), corrected and added ones as below.""" import json, os D = os.path.join(os.path.dirname(__file__), "..") existing = {} for line in open(os.path.join(D, "work", "existing.jsonl")): if line.strip(): l = json.loads(line) existing[l["id"]] = l KEPT = ["WILDSTRUBEL-74", "WILDSTRUBEL-77", "WILDSTRUBEL-78"] NEW = { "WILDSTRUBEL-71": {"start": "2026-09-22T08:45Z", "end": "2026-09-22T12:30Z", "family": "Thermal displacement", "description": "At the restart, in mid-morning, the camera is still nodded down: its tilt, high, comes back down until noon, goes a little below its evening level then returns to it in early afternoon, with its scale (which comes back more slowly), and all the raw positions, references included, move together in the image, like the next day at the same hours, while the housing temperature is at its daytime high. The compensation absorbs most of it, not all: the corr_y of PB2_2, and less of PB1_2, stay clearly above their night level while the tilt is high and come back down with it in late morning; the other targets keep nothing of it beyond the noise. Deduced cause: the mount or the lens of the camera heats up in the sun (the targets PB2_2 and PB1_2 keep a remainder that follows the tilt, on both days); according to the expert, the road hardly moves with temperature. Normal, nothing to do for the structure; the small morning rise of corr_y on PB2_2 and PB1_2 is not a movement."}, "WILDSTRUBEL-72": {"start": "2026-09-22T08:45Z", "end": "2026-09-22T13:00Z", "family": "Visibility", "description": "PB1_2 alone, on the morning of the restart: its corr_x moves strongly away on one side, then comes back little by little until early afternoon; relative to the overall movement of the targets, its raw position slides alone in the image and comes back, while its neighbours PB2_2 and PB4 stay with the others. Its error_value rises by day like that of all the targets, not more. On the thumbnails of 09:00 and 11:00, the spot of PB1_2 sits on the light band of the pavement kerb, bright in full sun; at 14:45 the kerb is in the shade and the curve is back; at night, under the infrared, the spot is sharp. Cause deduced from the thumbnails: the sunlit kerb next to the spot pulls its measured centre. The next morning, under the same light, the dip is much weaker. The structure is not moving: do not trust the curve of PB1_2 over the range."}, "WILDSTRUBEL-73": {"start": "2026-09-22T08:45Z", "end": "2026-09-22T15:15Z", "family": "Visibility", "description": "By day, from the restart in mid-morning to mid-afternoon: the error_value of all sensors, references included, is high and comes back down in the afternoon; the reference R3 is rejected almost all day, as every day (Target issue, separate label). The corrected curves of the targets are more agitated than at night, isolated points of PA3_2 and of other targets standing out a little beyond the noise, without a step; nothing like this at night. The jump of the first measurement after the restart, the slide of PB1_2 and the remainder of the camera movement on PB2_2 have their own labels. Deduced cause: daytime heat shimmer above the road, which the expert gives as a trait of the station (curve noise and error_value rising by day only); it cannot be seen directly, the images show the scene in full daylight. The structure is not moving: do not trust the small oscillations of the day."}, "WILDSTRUBEL-75": {"start": "2026-09-23T04:00Z", "end": "2026-09-23T12:15Z", "family": "Thermal displacement", "description": "At sunrise, the camera nods down: its tilt rises, with its scale, while its rotation and its pan first dip then swing above their night level in mid-morning, and all the raw positions, references included, move together in the image; the tilt peaks in early morning, goes below its night level in late morning, then comes back to it in early afternoon, while the housing temperature rises strongly; the scale comes back more slowly, until mid-afternoon. The compensation absorbs most of it, not all: the corr_y of PB1_2 and PB2_2 rise clearly above their night level while the tilt is high and come back with it in late morning; the other targets keep nothing of it beyond the noise. Deduced cause: the mount or the lens of the camera heats up in the sun (the same remainder on PB2_2 and PB1_2 as the day before, following the tilt); according to the expert, the road hardly moves with temperature. Normal, nothing to do for the structure; the small morning rise of corr_y on PB1_2 and PB2_2 is not a movement."}, "WILDSTRUBEL-76": {"start": "2026-09-23T04:00Z", "end": "2026-09-23T15:15Z", "family": "Visibility", "description": "By day, from sunrise to mid-afternoon: the error_value of all sensors, references included, rises at sunrise and comes back down in the afternoon; the reference R3 is rejected almost all day, as every day (Target issue, separate label). In early morning, with the low sun, PB4 is rejected for about an hour, R2 for two measurements, and PA_9 makes small jumps. The corrected curves of the targets are more agitated than at night, isolated points of PA_9, PA3_2, PB1_2, PB2_2 and PB_5 standing out a little beyond the noise, without a step; nothing like this at night. The sun in the field at sunrise, the remainder of the camera movement on PB1_2 and PB2_2, and the vehicle passages have their own labels. Deduced cause: daytime heat shimmer above the road, which the expert gives as a trait of the station (curve noise and error_value rising by day only), and the low sun in the morning; the shimmer cannot be seen directly, the images show the scene in full daylight. The structure is not moving: do not trust the small oscillations of the day."}, "WILDSTRUBEL-79": {"start": "2026-09-23T13:15Z", "end": "2026-09-23T13:45Z", "family": "Obstruction", "description": "A vehicle passes in front of PB4 and the reference R2, seen as translucent on the 13:30 image: PB4 and R2 are rejected for the time of one measurement, the compensation runs without R2 and the basis changes: PA3_2 jumps a little on corr_x, PA2_2 and PB1_2 on corr_y, together, just beyond the daytime noise. Everything comes back at the next measurement. The structure is not moving: point to ignore."}, } ADDED = [ {"start": "2026-09-22T08:45Z", "end": "2026-09-22T09:00Z", "family": "Visibility", "description": "First measurement after the restart of the station: the image of 08:45 is darker over the whole scene than those just before and after (thumbnails), the error_value of most sensors is high, and the references R1, R2 and R3 are rejected with the targets PB4 and PA3_2; the compensation runs on the three remaining references and the basis changes: PB_5 jumps strongly on corr_x, PB2_2 on corr_x and corr_y, PB1_2 on corr_y, PA2_2 and PA_9 a little, together. Everything is back at the next measurement. Cause deduced from the images: an exposure not yet settled at the first image after the restart; why is not established. The structure is not moving: point to ignore."}, {"start": "2026-09-23T04:00Z", "end": "2026-09-23T05:00Z", "family": "Visibility", "description": "At sunrise, the sun enters the field of the camera (04:15 image: the sun just above the buildings, flare across the image, the scene underexposed): the error_value of all sensors jumps, the reference PA_8 is rejected for two measurements and PA_9 for two; the compensation runs without PA_8 and the basis changes: PA_9 and PA2_2 jump clearly on corr_x, PA2_2 also on corr_y, PB1_2 a little, together. Back at the next measurement once the sun has passed. Cause seen on the image: the sun in the field. The structure is not moving: points to ignore."}, ] out = [] for lid in ["WILDSTRUBEL-71", "WILDSTRUBEL-72", "WILDSTRUBEL-73", "WILDSTRUBEL-74", "WILDSTRUBEL-75", "WILDSTRUBEL-76", "WILDSTRUBEL-77", "WILDSTRUBEL-78", "WILDSTRUBEL-79"]: if lid in KEPT: l = dict(existing[lid]); l.pop("id") else: l = NEW[lid] out.append(l) out += ADDED out.sort(key=lambda l: (l["start"], l["end"])) with open(os.path.join(D, "labels.jsonl"), "w") as f: for l in out: f.write(json.dumps(l, ensure_ascii=False) + "\n") print(len(out), "labels")