19 lines
3.2 KiB
Python
19 lines
3.2 KiB
Python
"""Writes labels.jsonl: kept labels copied verbatim from work/existing.jsonl (id dropped), one corrected, one added."""
|
|||
|
|
import json, pathlib
|
||
|
|
out = pathlib.Path(__file__).resolve().parent.parent
|
||
|
|
old = {d["id"]: d for d in map(json.loads, open(out / "work/existing.jsonl"))}
|
||
|
|
labels = []
|
||
|
|
for i in ["MICHIGAN-11", "MICHIGAN-12", "MICHIGAN-13", "MICHIGAN-14", "MICHIGAN-15"]:
|
||
|
|
d = dict(old[i]); d.pop("id"); labels.append(d)
|
||
|
|
labels.append({"start": "2026-10-23T20:00Z", "end": "2026-10-25T00:00Z", "family": "Thermal displacement",
|
||
|
|
"description": "The corr_y of all the targets goes down together on 24 October at midnight, partly rises again in the morning, dips again in the afternoon and returns at the 20:00 measurement. Their corr_x, which had already started to go down at the end of 23 October, stays slightly low the whole of 24 October, lowest at the 20:00 measurement, and only returns at midnight on 25 October. The camera housing temperature drops at the same moment, stays a little low until the evening and comes back at midnight on 25 October; the camera nods forward and its scale drops, the scale coming back only at midnight on 25 October with the corr_x; the raw positions of all the targets and of the two references slide almost together, the targets do not move relative to each other. The compensation on REF42 and REFG43N alone carries their small gap relative to the targets over to all the targets. Cause deduced from the curves, the camera pose and the camera housing temperature, not a day/night cycle; nothing in front of the targets on the midnight image nor on the 20:00 image. Small deviation. For the customer: this is not a movement of the structure, nothing to do."})
|
||
|
|
labels.append({"start": "2026-10-31T00:00Z", "end": "2026-10-31T16:00Z", "family": "Thermal displacement",
|
||
|
|
"description": "On 31 October, the corr_y of all the targets goes down a little together at 04:00, more at 08:00, partly rises again at 12:00 and returns at 16:00; the corr_x goes down a little at 04:00 and 12:00, less clearly. The camera housing temperature makes a small drop at the same time, lowest at 07:00, and rises again from 09:00; the camera nods forward slightly and rotates, its scale drops a little, the raw positions of all the targets and of the two references slide almost together, the targets do not move relative to each other. The compensation on REF42 and REFG43N alone carries their small gap relative to the targets over to all the targets. Same signature as on 24 October, weaker. Cause deduced from the curves, the camera pose and the camera housing temperature; nothing in front of the targets on the 00:00 and 08:00 images. Small deviation. For the customer: this is not a movement of the structure, nothing to do."})
|
||
|
|
labels.sort(key=lambda d: d["start"])
|
||
|
|
with open(out / "labels.jsonl", "w") as f:
|
||
|
|
for d in labels: f.write(json.dumps(d, ensure_ascii=False) + "\n")
|
||
|
|
# bounds check: start < end, 4 h measurement instants, inside the range
|
||
|
|
for d in labels:
|
||
|
|
assert d["start"] < d["end"] and d["start"][11:13] in ("00","04","08","12","16","20") and d["end"][11:13] in ("00","04","08","12","16","20")
|
||
|
|
assert "2026-10-23T20:00Z" <= d["start"] and d["end"] <= "2026-11-01T00:00Z"
|
||
|
|
print(len(labels), "labels")
|