"""Build labels.jsonl: existing labels kept as they are (without id), three corrected, seven added.""" import json D = 'labeling/auto/analyses/NIEDERHORN_2026-10-21T1200_2026-11-01T0000/' PLANT = ("It is the foreground plant, shaken by the wind, which, according to the expert, passes in front of this target. " "The structure does not move: ignore this target's curve over the range.") corrected = { 'NIEDERHORN-105': dict(start='2026-10-23T09:00Z', end='2026-10-23T16:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone: at 10:00 its corr_x jumps up and its corr_y down strongly for one measurement; at 12:00 and 13:00 " "its recognition error jumps almost to the maximum and the measurement is rejected; at 14:00 its corr_x jumps up strongly " "again and its corr_y down; at 15:00 its corr_x is still a little off, back at 16:00; its neighbours do not move. Cause seen: " "on the 10:00 thumbnail a leaf touches the spot; on the 12:00 and 13:00 thumbnails, at daybreak, blurred leaves cover the " "spot, almost invisible. " + PLANT), 'NIEDERHORN-114': dict(start='2026-10-26T01:00Z', end='2026-10-26T05:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 02:00 its corr_y jumps up clearly, at 04:00 its corr_x jumps up and its " "corr_y down strongly, each time for one measurement, back in between and after; its recognition error rises at both; its " "neighbours do not move. Cause seen on the 04:00 thumbnail: the tips of leaves touch the spot; on the 02:00 thumbnail, leaves " "are just next to it. " + PLANT), 'NIEDERHORN-119': dict(start='2026-10-27T06:00Z', end='2026-10-27T10:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone: at 07:00 its corr_y rises clearly for one measurement, at 08:00 its recognition error jumps above " "the threshold and the measurement is rejected, at 09:00 its corr_x jumps up and its corr_y down strongly; back at 10:00; its " "neighbours do not move. Cause seen on the 08:00 thumbnail: leaves touch the spot; on the 07:00 thumbnail they are just next " "to it. " + PLANT), } added = [ dict(start='2026-10-22T20:00Z', end='2026-10-23T01:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 21:00 and again at 23:00 its corr_y jumps up clearly for one measurement " "(its corr_x drops a little at 21:00), back at 22:00 in between; its recognition error rises at 20:00, 21:00 and 23:00; its " "neighbours do not move. The 00:00 measurement is missing for all the sensors (labelled apart); back at 01:00. The 21:00 spike " "falls in the thermal cycle of the day, labelled apart. Cause seen on the 20:00 and 21:00 thumbnails: blurred leaves sweep " "across and next to the spot. " + PLANT), dict(start='2026-10-23T04:00Z', end='2026-10-23T06:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 05:00 its corr_x jumps up and its corr_y drops clearly for one " "measurement, then comes back; its neighbours do not move. On the 05:00 thumbnail, leaves are just next to the spot, at its " "lower right. Cause deduced from the signature, the same as the other passages of the plant before this target on these days. " + PLANT), dict(start='2026-10-25T16:00Z', end='2026-10-25T18:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 17:00 its corr_x jumps up clearly and its corr_y drops a little for one " "measurement, then comes back; its recognition error rises at that measurement; its neighbours do not move. It falls in the " "thermal cycle of the day, labelled apart. Cause seen on the 17:00 thumbnail: a blurred leaf sweeps just under the spot. " + PLANT), dict(start='2026-10-26T06:00Z', end='2026-10-26T08:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 07:00 its corr_y jumps up clearly and its corr_x drops a little for one " "measurement, then comes back; its recognition error rises at that measurement; its neighbours do not move. On the 07:00 " "thumbnail, leaves are just next to the spot; the same plant made this target jump earlier in the night (labelled apart). " + PLANT), dict(start='2026-10-26T12:00Z', end='2026-10-26T16:00Z', family='Thermal displacement', description= "Thermal cycle of the day (26/10), short and weak. The housing temperature rises a little from 12:00 to 14:00, then stays " "almost flat in the afternoon and drops slowly in the evening, much less than on the sunny days. The camera pose follows: " "at 14:00 the tilt rises markedly and the rotation drops a little, the scale rises a little, the pan rises only slightly; " "tilt and rotation are back at the next measurement, 16:00 (the 15:00 measurement is missing for all the sensors, labelled " "apart), the pan by 17:00, the scale only slowly, during the night. Read against the overall movement, the references and " "the targets move together in the image: it is the camera, not one reference. The compensation absorbs most of it: at " "14:00 only the corr_x of PWD_IMP_B08_024_C09, PWD_IMP_B07_018_C09 and PWD_IMP_B08_025_C09 drops a little, as on the sunny " "days, the corr_y hardly moves; the curves are back at 16:00. On the 14:00 image, the sun shines through thin clouds at the " "top of the field. Deduced cause: the camera and its mount move with the housing temperature, warmed briefly by the sun; the " "same signature as the daily cycles of the other days, weaker. The rejection of e06 and the rise of the recognition error of " "PWD_REF10_C09 at that measurement are labelled apart (Visibility). Normal, nothing to do."), dict(start='2026-10-26T16:00Z', end='2026-10-26T18:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 17:00 its corr_y jumps up and its corr_x drops a little for one " "measurement, then comes back; its recognition error rises a little; its neighbours do not move. Cause seen on the 17:00 " "thumbnail: a blurred leaf sweeps next to the spot. " + PLANT), dict(start='2026-10-28T03:00Z', end='2026-10-28T05:00Z', family='Obstruction', description= "PWD_IMP_B07_016_C09 alone, without any rejection: at 04:00 its corr_y jumps up clearly and its corr_x drops a little for one " "measurement, then comes back; its neighbours do not move. Cause seen on the thumbnails: leaves appear right next to the spot " "at 04:00, absent at 03:00 and 05:00. " + PLANT), ] out = [] for l in open(D + 'work/existing.jsonl'): d = json.loads(l) i = d.pop('id') out.append(corrected.get(i, d)) out += added out.sort(key=lambda d: (d['start'], d['end'])) with open(D + 'labels.jsonl', 'w') as f: for d in out: f.write(json.dumps(d, ensure_ascii=False) + '\n') print(len(out), 'labels;', sum('review' in d for d in out), 'with review')