This commit is contained in:
maxime committed 2026-11-18 10:51:31 +01:00
1 parent 8e4ebca342
commit 58b630f2d5
112 files changed
+3172 -295

No files matched your search

@@ -1,6 +1,41 @@
# Requalification of the long labels: CLARIDEN
# CLARIDEN, October: Displacement labels requalified (significant only)
- **CLARIDEN-1** (Target issue, P-300-B, 01/10 → 01/11): **kept** as is. P-300-B is rejected at 4070 of the 4070 measurement instants present in the range (`inventory.py --start 2026-10-01T00:00Z --end 2026-11-01T00:00Z`; 6371 of 10137 over the whole period, since 29/09). A target rejected almost always: Target issue.
- **CLARIDEN-14** (Displacement, 06/10 22:00 → 11/10 06:00): **corrected** (description). The drift is beyond the threshold: `ranges.py --k 5` from 05/10 10:30 to 15/10 22:50, the level taken outside the label: D-301-C corr_x out of level up to −19.5 noises (−0.22 px, about −1.1 mm) until 08/10 09:20 before it rises to its later level; D-303-B corr_y up to −15.6 noises (about −0.44 mm) until 08/10 08:40; D-304-C corr_x −9.0, D-303-C corr_y −7.1, D-306-B corr_x +6.4 noises. Bounds and family hold. Correction applied (found by the analyst of the 01/10–11/10 period): "No camera movement" is wrong, the camera tilt drifts over these days and D-303-B, D-303-C, D-304-C, D-301-C follow it (hourly r −0.86 to −0.95, `CLARIDEN_2026-10-01T0000_2026-10-11T0000/analysis.md`); the conclusion becomes "camera to monitor". Review removed.
Request of the user (2026-11-18): too many small displacements, most going back the other way later; keep only the significant ones, on all CLARIDEN series.
Sources read: `tools/GUIDE.md`, `tools/DATA.md`, `labeling/families.md`, `labeling/labeling-rules.md`, `labeling/reading-rules.md`, `labeling/stations.md`, `input.jsonl`, the analyses of the three CLARIDEN periods (lines on CLARIDEN-1 and CLARIDEN-14). Commands: `inventory.py` (month, `work/inv_month.txt`), `ranges.py` (corr and corr_mm, 5 targets, `--outside` the label).
## Method
- `scripts/disp_size.py` (`work/disp_size.txt`): per label and per target, the extreme of the 1 h rolling median of `corr_x_mm` / `corr_y_mm` from the level of the 6 h before, in mm and in own noises (median step), the net change at the end, and the month spread (P5–P95) of each target. PR-284 and PR_BG are discarded as noisy, with a large mm/px.
- `scripts/short_native.py` (`work/short_native.txt`): the native-step extreme of the short labels.
- `scripts/month_plot.py` (`work/month_displacements.png`): hourly medians of the targets concerned over October, with the labels, the camera tilt and the housing temperature.
- Criterion: kept if a clean target moves by ≥ about 0.4 mm and ≥ 10 noises on its 1 h median, and keeps that level for days. Removed if the event is a wave that comes back, a remainder of a camera jump of one measurement, or ≤ about 8 noises.
## Per label
| id | decision | evidence |
|---|---|---|
| CLARIDEN-14 | kept, corrected (pointer to 72 replaced) | D-301-C x +1.1 mm (19 n), D-303-B y +0.36 mm (12 n), kept afterwards |
| CLARIDEN-23 | kept, corrected (pointer to 32 replaced) | D-304-C y +0.48 mm (14 n), D-303-C y +0.42 mm (11 n), D-301-C x about +0.5 mm, kept |
| CLARIDEN-3 | removed | D-303-B −0.25 mm, D-306-B −0.11 mm (13 n, but 0.1 mm), back with 44; D-302-B +0.7 mm is its own two-level jump |
| CLARIDEN-44 | removed | return of 3; D-301-C −0.84 mm is a one-hour spike (net −0.07 mm) |
| CLARIDEN-46 | removed | P-301-B y +0.39 mm, 6.9 n native, back the same day |
| CLARIDEN-73 | removed | D-303-B y −0.19 mm, 7.3 n native |
| CLARIDEN-72 | removed | partial return of 14: D-301-C −0.28 mm (5 n); its big D-302-B value is that target's own steps of 11/10 and 14/10 |
| CLARIDEN-50 | removed | one measurement, D-301-A y −0.43 mm, 5.9 n |
| CLARIDEN-53 | removed | ≤ 5.2 n on the 1 h median, ≤ 0.2 mm |
| CLARIDEN-54 | removed | one measurement, D-302_A x +0.37 mm, 5.3 n |
| CLARIDEN-59 | removed | D-306-B y +0.05 mm, 6.4 n |
| CLARIDEN-62 | removed | D-303-B +0.17 mm (5.8 n), back with 29 |
| CLARIDEN-29 | removed | D-306-B −0.11 mm, D-304-B −0.2 mm; wave with 62/30 |
| CLARIDEN-30 | removed | D-306-B +0.05 mm (5.4 n) |
| CLARIDEN-31 | removed | D-306-B +0.13 mm, D-304-B +0.26 mm, D-304-A +0.38 mm (6 n), back with 63 |
| CLARIDEN-32 | removed | partial return of 23, D-304-C −0.25 mm (7 n) |
| CLARIDEN-63 | removed | same dates and targets as 32 (−0.26 mm, 7 n) |
| CLARIDEN-36 | removed | D-306-B −0.06 mm, 7.8 n |
| CLARIDEN-1 | kept as is | P-300-B rejected at 4070/4070 instants |
The labels removed or corrected are in the labels.jsonl of the analysis that owns them: `CLARIDEN_2026-10-01T0000_2026-10-11T0000` (12 → 8), `CLARIDEN_2026-10-11T0000_2026-10-20T0400` (11 → 6), `CLARIDEN_2026-10-20T0400_2026-11-01T0010` (21 → 14, 23 corrected), and this one (14 corrected). `labeling/auto/CLARIDEN.jsonl` follows them since 2026-11-18 (the three period analyses submitted again: 46 → 30 labels, 2 Displacement; CLARIDEN-23 keeps its id; then CLARIDEN-9 restored: 31 labels, 3 Displacement).
## Not labeled, for the record
- D-302-B / PR_BG: two-level jumps (about 0.75 mm) on 1/10, 5/10, 11/10, 14/10, specific to that prism.
- Across the 3→5/10 outage: D-304-C about −1.5 mm, D-303-C about −0.6 mm, with a change of camera tilt: CLARIDEN-9 (analysis `CLARIDEN_2026-10-01T0000_2026-10-11T0000`), deleted before this pass, restored on 2026-11-18 at the user's request, unchanged.
## Sources read
Previous turn (docs, inventory, ranges); this turn: `labeling/auto/CLARIDEN.jsonl`, the labels.jsonl of the four CLARIDEN analyses, `app/server/analysis.py` (how labels are submitted), `tools/scripts/data.py` (loader), data/CLARIDEN through the scripts above.
@@ -1,2 +1,2 @@
{"start": "2026-10-01T00:00Z", "end": "2026-11-01T00:00Z", "family": "Target issue", "description": "The target P-300-B is rejected at every measurement of the batch: its recognition error stays almost at 1, its corrected curve is missing over the whole month. This has lasted since 29 September in the late afternoon, the time when the recognition error of other targets, including its neighbor P-301-B, also changes level all at once: a station setting changed that day. On the thumbnails (the 1st, the 15th and the 31st), the prism spot is sharp and bright, but next to the position where the system looks for it: the target seems badly configured or badly positioned, not hidden. Curve to ignore; correct the position of the target in the configuration or check the prism.", "review": "2026-11-17"}
{"start": "2026-10-06T22:00Z", "end": "2026-10-11T06:00Z", "family": "Displacement", "description": "Slow drift of several targets over four days, made of small steps, then stabilization: D-303-B rises vertically, D-303-C and D-304-C rise vertically, D-301-C rises horizontally, D-306-B goes down horizontally. The camera moves: its tilt drifts slowly over the same days, with a small step on the 8th, and these targets follow it closely in the directions of their curves; the compensation does not absorb this tilt equally on every target. Ordinary recognition error, nothing on the images. The camera housing temperature stays almost constant over these days: no link with it. Slow return from the 11th to the 19th, labeled separately. Deduced from the curves and the camera pose: mostly a remainder of the camera tilt, not established as a movement of the structure; the camera is to be monitored, and these targets checked against the other measurements of the site."}
{"start": "2026-10-06T22:00Z", "end": "2026-10-11T06:00Z", "family": "Displacement", "description": "Slow drift of several targets over four days, made of small steps, then stabilization: D-303-B rises vertically, D-303-C and D-304-C rise vertically, D-301-C rises horizontally, D-306-B goes down horizontally. The camera moves: its tilt drifts slowly over the same days, with a small step on the 8th, and these targets follow it closely in the directions of their curves; the compensation does not absorb this tilt equally on every target. Ordinary recognition error, nothing on the images. The camera housing temperature stays almost constant over these days: no link with it. Afterwards D-301-C comes back down a little over the following days, too little to be labeled, and D-303-B stays at its new level. Deduced from the curves and the camera pose: mostly a remainder of the camera tilt, not established as a movement of the structure; the camera is to be monitored, and these targets checked against the other measurements of the site.", "review": "2026-11-18"}
@@ -1,5 +1,19 @@
# CLARIDEN long labels: requalification
# CLARIDEN, October: Displacement labels pruned
2 labels: 1 kept, 1 corrected, 0 removed.
Only the significant displacements are kept: those that move a clean target by several tenths of a mm and that it keeps, against a month where the targets wander back and forth by a few tenths of a mm.
- **CLARIDEN-14** corrected: the drift does stand out (up to about 20 noises: D-301-C horizontal about 1 mm, D-303-B vertical about 0.4 mm), but its text said "no camera movement". In fact the targets follow the slow tilt of the camera, so the conclusion is now "the camera is to be monitored" rather than "the targets may be moving". The bounds and the family are unchanged.
**Kept (2 Displacement labels)**
- **CLARIDEN-14** (06/10 → 11/10): row C drift, D-301-C horizontally about +1.1 mm (≈19 noises), D-303-B vertically about +0.35 mm (≈12 noises), which keep their new level. It follows the slow tilt of the camera. Corrected: it pointed to a return label that is now removed.
- **CLARIDEN-23** (20/10 → 25/10): second row C drift, D-301-C +0.5 mm, D-304-C about +0.5 mm (≈14 noises), D-303-C about +0.4 mm (≈11 noises), kept afterwards. Corrected the same way (its partial return is no longer labeled).
**Removed (16)**: all small (about 5 to 7 noises at the native step, or a wave of 0.1–0.3 mm), or going back the other way within hours or days:
- 01→03/10: CLARIDEN-3 (row B dip, D-303-B −0.25 mm, D-306-B −0.1 mm) and CLARIDEN-44 (its return); CLARIDEN-46 (P-301-B, +0.4 mm, 7 n, back the same day).
- CLARIDEN-73 (06/10 camera step, D-303-B 7 n, 0.2 mm), CLARIDEN-72 (partial return of 14, D-301-C −0.3 mm).
- One-measurement drops at the camera jumps: CLARIDEN-50 (11/10, 6 n), CLARIDEN-54 (18/10, 5 n), CLARIDEN-59 (20/10, 6 n, D-306-B 0.05 mm).
- CLARIDEN-53 (17→20/10 tilt, ≤ 5 n, 0.2 mm).
- 22→29/10, row B and row A going up and down: CLARIDEN-62, 29, 30 (D-304-B, D-303-B ±0.2 mm), CLARIDEN-31 (row A jolts, D-304-A +0.4 mm, 6 n), CLARIDEN-32 and CLARIDEN-63 (partial returns, 0.25 mm, 7 n), CLARIDEN-36 (step of D-306-B, 0.06 mm, 8 n).
**To know**
- The other families (Visibility, Obstruction, No data, Target issue, Thermal) are untouched.
- D-302-B (with PR_BG, on the same prism) jumps between two levels about 0.75 mm apart (1/10, 5/10, 11/10, 14/10). These jumps belong to that target, not to the structure. No label covers them now. They look like the configuration jump labeled as Target issue on 29/10 (CLARIDEN-65).
- Across the outage of 3→5/10, D-304-C (about −1.5 mm) and D-303-C (about −0.6 mm) come back at a new level, and the camera tilt changed at the same time. This is the largest shift of the month: CLARIDEN-9 covers it, deleted before this pass and restored on 2026-11-18 at your request (unchanged, its review kept).
@@ -0,0 +1,41 @@
"""Size of each Displacement label of CLARIDEN: per target, deviation of the 1 h rolling median of corr (px, mm)
from the level of the 6 h before the label, extreme within the label, net change at its end, in mm and in noises;
plus the month spread of each target (P5-P95 of its 1 h median) for scale."""
import sys, json, statistics as st
from datetime import timedelta
sys.path.insert(0, "tools/scripts")
import data
D = data.load("data/CLARIDEN")
S, E = data.parse_time("2026-09-25T00:00Z"), data.parse_time("2026-11-05T00:00Z")
tg = {s: [m for m in ms if S <= m["t"] <= E] for s, ms in D.items() if not data.is_reference(ms) and s not in ("P-300-B", "PR-283")}
def roll(ms, c):
out = []
for i, m in enumerate(ms):
w = [x[c] for x in ms[max(0, i-3):i+3] if x[c] is not None]
if m[c] is not None and len(w) >= 3: out.append((m["t"], st.median(w)))
return out
noise, R, spread = {}, {}, {}
for s, ms in tg.items():
for c in ("corr_x_mm", "corr_y_mm"):
v = [m[c] for m in ms if m[c] is not None]
if len(v) < 100: continue
noise[s, c] = st.median(abs(a-b) for a, b in zip(v, v[1:])) or 1e-9
R[s, c] = roll(ms, c)
h = sorted(x for _, x in R[s, c]); spread[s, c] = h[int(.95*len(h))] - h[int(.05*len(h))]
labels = [json.loads(l) for l in open("labeling/auto/CLARIDEN.jsonl")]
for L in labels:
if L["family"] != "Displacement": continue
a, b = data.parse_time(L["start"]), data.parse_time(L["end"])
rows = []
for (s, c), r in R.items():
pre = [x for t, x in r if a - timedelta(hours=6) <= t <= a]
ins = [(t, x) for t, x in r if a <= t <= b]
if len(pre) < 6 or len(ins) < 2: continue
lv = st.median(pre)
t0, ex = max(ins, key=lambda p: abs(p[1]-lv))
net = ins[-1][1] - lv
rows.append((abs(ex-lv)/noise[s, c], s, c[5], ex-lv, (ex-lv)/noise[s, c], net, spread[s, c]))
rows.sort(reverse=True)
print(f"{L['id']} {L['start']}->{L['end']} ({(b-a).total_seconds()/3600:.1f} h)")
for r in rows[:4]:
print(f" {r[1]:8s} {r[2]} ext {r[3]:+.3f} mm ({r[4]:+.1f} n) net {r[5]:+.3f} mm month spread {r[6]:.3f} mm")
@@ -0,0 +1,30 @@
"""Hourly medians of corr_x_mm / corr_y_mm of the targets that carry the CLARIDEN Displacement labels, over October,
with every Displacement label shaded and named, and the camera tilt and housing temperature."""
import sys, json, statistics as st
from collections import defaultdict
sys.path.insert(0, "tools/scripts")
import data
import matplotlib; matplotlib.use("Agg"); import matplotlib.pyplot as plt
D = data.load("data/CLARIDEN")
S, E = data.parse_time("2026-10-01T00:00Z"), data.parse_time("2026-11-01T00:00Z")
series = [("D-302-B","corr_y_mm"),("D-301-C","corr_x_mm"),("D-303-B","corr_y_mm"),("D-303-C","corr_y_mm"),
("D-304-C","corr_y_mm"),("D-306-B","corr_y_mm"),("D-304-B","corr_y_mm"),("P-301-B","corr_y_mm"),("D-304-A","corr_y_mm")]
def hourly(pairs):
h = defaultdict(list)
for t, v in pairs:
if v is not None and S <= t <= E: h[t.replace(minute=0, second=0)].append(v)
k = sorted(h); return k, [st.median(h[x]) for x in k]
cam = data.load_camera("data/CLARIDEN"); tmp = data.load_temperature("data/CLARIDEN")
fig, ax = plt.subplots(len(series)+2, 1, figsize=(18, 2.0*(len(series)+2)), sharex=True)
labels = [json.loads(l) for l in open("labeling/auto/CLARIDEN.jsonl")]
for i, (s, c) in enumerate(series):
t, v = hourly((m["t"], m[c]) for m in D[s]); ax[i].plot(t, v, lw=.8); ax[i].set_ylabel(f"{s}\n{c[5]} mm", fontsize=8)
t, v = hourly((p["t"], p.get("tilt")) for p in cam); ax[-2].plot(t, v, "k", lw=.8); ax[-2].set_ylabel("tilt")
t, v = hourly(tmp); ax[-1].plot(t, v, "r", lw=.8); ax[-1].set_ylabel("housing °C")
for L in labels:
if L["family"] not in ("Displacement", "No data"): continue
a, b = data.parse_time(L["start"]), data.parse_time(L["end"])
for x in ax: x.axvspan(a, b, color="orange" if L["family"] == "Displacement" else "grey", alpha=.2, lw=0)
if L["family"] == "Displacement": ax[0].text(a, ax[0].get_ylim()[1], L["id"].split("-")[1], fontsize=7, va="top")
for x in ax: x.grid(alpha=.3)
plt.tight_layout(); out = sys.argv[1]; plt.savefig(out, dpi=80); print(out)
@@ -0,0 +1,25 @@
"""Native-step extreme of the short CLARIDEN Displacement labels: per target, the largest deviation of corr_x_mm /
corr_y_mm within the label from the median of the 6 h before, in mm and in the target's own noise (median step)."""
import sys, json, statistics as st
from datetime import timedelta
sys.path.insert(0, "tools/scripts")
import data
D = data.load("data/CLARIDEN")
ids = sys.argv[1].split(",")
for l in open("labeling/auto/CLARIDEN.jsonl"):
L = json.loads(l)
if L["id"] not in ids: continue
a, b = data.parse_time(L["start"]), data.parse_time(L["end"]); rows = []
for s, ms in D.items():
if data.is_reference(ms) or s in ("P-300-B", "PR-283"): continue
for c in ("corr_x_mm", "corr_y_mm"):
v = [m[c] for m in ms if m[c] is not None and a - timedelta(days=2) <= m["t"] <= b + timedelta(days=2)]
if len(v) < 50: continue
n = st.median(abs(x - y) for x, y in zip(v, v[1:])) or 1e-9
pre = [m[c] for m in ms if m[c] is not None and a - timedelta(hours=6) <= m["t"] < a]
ins = [m[c] for m in ms if m[c] is not None and a < m["t"] < b]
if len(pre) < 6 or not ins: continue
lv = st.median(pre); d = max(ins, key=lambda x: abs(x - lv)) - lv
rows.append((abs(d) / n, s, c[5], d))
rows.sort(reverse=True)
print(L["id"], L["start"], "->", L["end"], "; ".join(f"{s} {c} {d:+.2f} mm ({k:.1f} n)" for k, s, c, d in rows[:3]))