Files
aimsight-optimizer/sessions/CLARIDEN_2026-10-01T0000_2026-11-01T0000_20261118T1219Z/modification.md
T

17 KiB
Raw Blame History

Modification

Verdict: changed Changed: scripts/displacement.py, scripts/thermal_displacement.py, thresholds.md

Diagnosis

CLARIDEN, 2026-10-01 → 2026-11-02 (UTC; labels up to 2026-11-01), cadence 10 min, 24 targets and 5 references.

Events touching the range (before → after; a label is "found" when an event of its family overlaps it in time):

Family labelled found flagged wrongly
Displacement 3 3 2 0
No data 13 13 13 0
Obstruction 2 2 5 3
Perturbation 0 0 6 6
Target issue 3 3 1 0
Thermal displacement 1 0 4 → 2 4 → 2
Visibility 9 1 1 0
  • CLARIDEN-74, CLARIDEN-23 (Displacement, slow drifts of row C and row B, 06→11/10 and 20→25/10): found, but far too wide. The Slow drift event ran from 28/09 to 01/11 (Displacement correct 34 % on the range). Cause: displacement.py, drift pieces. A piece only refused a day-to-day step larger than half of its own drift, so a long enough piece could swallow a jump: D-304-C's step across the 3→5/10 outage (3.9 daily amplitudes) became one month-long piece, and D-302-B and PR_BG (the prism's own two-level jumps, see the report) made pieces too. Fixed by S1. The pieces that are left are still long: D-301-C, D-303-C, D-304-B and D-306-B creep by 3.5 to 4 daily amplitudes over 2 to 3 weeks. Not fixed (see below).
  • CLARIDEN-9 (Displacement, shift across the 3→5/10 outage): found (Lasting shift D-304-C at 10:40, and the drift event).
  • No data, 13 labels: correct.
  • CLARIDEN-1 (Target issue, P-300-B): correct.
  • CLARIDEN-35 (Target issue, PR-284 one-measurement jump, 27/10 12:10): wrong family. It comes out as a Perturbation on PR-284. The label's reason is a spot that has been weaker since 24/10. target_issue.py needs rejections almost every day, and PR-284 is not rejected. Limit.
  • CLARIDEN-65 (Target issue, D-302-B and PR_BG configuration jump at midnight 29→30/10): missed on its sensors. It counts as found only because the P-300-B event covers the same time. Nothing detects a change of starting position (the raw positions do not move). Limit.
  • Visibility, 8 labels missed (CLARIDEN-7, 12, 45, 55, 61, 69, 70, 71); CLARIDEN-2 found on 3 of 15 instants. visibility.py sees too little. The median error_value rises by at most 1 to 2.4 MAD in these episodes (K_DIFFUSE is 2.5, held for 3 instants), and at most 0 to 5 sensors reach the K_MAD "high" level. In early October the error_value baseline sits 2 to 4 MAD under the window's median (the station setting changed on 29/09), so CLARIDEN-2 and CLARIDEN-45 stay negative in z. The labels recognise these episodes from the bump of the "usual group" of curves. Not fixed: a window-relative baseline is a new mechanism, and lowering K_DIFFUSE would fit this station.
  • CLARIDEN-12 (10-06 18:10–20:50) and CLARIDEN-71 (10-31 22:40–23:00): taken by Thermal "Camera thermal movement". Cause: thermal_displacement.slides paired a raw move on one axis (y) with a corrected move on the other (corr_x). That is not the camera carrying the curves. Fixed by S2. Both episodes are now unflagged, which is still missed Visibility.
  • Thermal, extra events 10-01 08:00–20:50 and 10-24 06:00–23:20 (no label): still there. Each is a few isolated same-axis slide instants (4 and 9) joined into one episode because they are less than a day apart. Shortening the join loses LENZSPITZE and WYOMING (tried, see Not fixed).
  • CLARIDEN-68 (Thermal displacement, 31/10 09:20–15:00, camera scale and pan with the housing temperature): missed. There is no daily cycle on the corrected or raw curves for _wave, and no slide. Limit.
  • CLARIDEN-10 (Obstruction, camera shifted at the first measurement after the outage, 05/10 10:30): found on its first instant (the label opens at that measurement because nothing comes before it). Bound gap only. CLARIDEN-11 (Obstruction, row C rejected, 12:20): correct.
  • Obstruction, extra: 05/10 12:00 (row A, 3 sensors, one measurement before CLARIDEN-11): small nuisance. 31/10 19:50 and 22:30–23:10, PR-295 rejected: inside CLARIDEN-70 and CLARIDEN-71, where the labels read the poorly seen reference as Visibility. Wrong family: one rejected reference looks like "something in front of a few targets" to visibility.py.
  • Perturbation, extra: 01/10 11:30, 23/10 13:40 (the targets together, one measurement): no label. 05/10 10:30–23:50 (D-302-B, the prism's own two-level jumps; the report says no label covers them). 31/10 22:50 (inside CLARIDEN-71: a jump with no Visibility episode to join, see the Visibility misses). 27/10 12:10 (CLARIDEN-35, above). 01/11 02:20 (PR-284, after the last label).

What changed

  • S1 (260d942), scripts/displacement.py, _pieces: the step condition was step <= abs(d) / 2 and is now step <= PIECE * ampl / 2. In a piece, a day-to-day step larger than half the minimum piece (1.75 daily amplitudes) is a jump, however long the drift around it. The drift comment and the PIECE line of thresholds.md say so. No constant added.
  • S2 (9577c52), scripts/thermal_displacement.py, slides: a slide instant now needs the raw positions and the corrected curves to move away on the same axis (x with corr_x, y with corr_y). Before, any raw axis was paired with any corrected axis. Docstring updated. +1 code line.
  • S3 (d967fd2), scripts/displacement.py, drift: removed if is_reference(ms): continue. The slow drift now reads references too. Removing it changed no figure (pruning). −2 code lines.
  • S4 (b9d7aea), scripts/thermal_displacement.py, _signs: len(before) >= 3 became before. Any value in the day before gives the median. Removing it changed no figure (pruning).

Why

  • S1: a slow drift is many small daily steps. Limiting a step only by half of the drift the piece reached let a jump (here across an outage, or a target flipping between two levels) pass as a drift once the piece grew long enough around it. That gave a drift spanning the whole window. Tying the step to the minimum piece keeps jumps out of drifts at any length.
  • S2: a camera that slides carries the curves the same way it moves in the image, so the corrected curves move on the same axis as the raw positions. Pairing a raw move on one axis with a corrected move on the other took visibility episodes (the compensation shifting on a poorly seen reference) for a thermal camera movement.
  • S3, S4: rules whose removal changes nothing on the benchmark (CLAUDE.md, Pruning).

Checks

  • events: Displacement Slow drift 2026-09-28T00:00Z → 2026-11-01T23:50Z, 8 sensors → 2026-09-29T00:00Z → 2026-10-25T23:50Z, 5 sensors. Thermal 2026-10-01T07:50Z → 20:50Z → 08:00Z → 20:50Z. Thermal 2026-10-06T18:10Z → 20:50Z and 2026-10-31T22:40Z → 23:00Z removed. No skipped line.
  • sensors: Slow drift D-301-C, D-302-B, D-303-B, D-303-C, D-304-B, D-304-C, D-306-B, PR_BG → D-301-C, D-303-C, D-304-B, D-304-C, D-306-B (D-302-B and PR_BG are the prism's own jumps; D-303-B is named by CLARIDEN-74 and lost).
  • range: Displacement correct 1422/4213 (34 %) → 1422/3215 (44 %). Thermal correct 0/204 → 0/183. Every "found" unchanged.
  • benchmark: 0 regressions at each step (S1 against before, S2 against S1, S3 against S2, S4 against S3). The whole is under ## Benchmark. Outputs: benchmark-S1.txt … benchmark-S4.txt, events-S<n>.txt, sensors-S<n>.txt, range-S<n>.txt in this folder.

Pruning

Each rule of displacement.py and thermal_displacement.py was removed alone, on a copy of the S2 state, and compared with benchmark-S2.txt:

  • drift, references excluded: removed, S3 d967fd2 (no change).
  • _signs, at least 3 values the day before: removed, S4 b9d7aea (no change).
  • jumps, BACK_H ("Jump, not back yet" against "Lasting shift"): no change on the benchmark, kept. Its removal deletes a variety listed in labeling/families.md for the client, and in live use the jumps of the last day would read "stayed shifted for more than a day". See "For the user to decide".
  • drift pieces, step condition: kept. CLARIDEN Displacement correct 44 → 35 %, Total Displacement correct 58 → 25 %.
  • drift whole window, step condition: kept. CLARIDEN Displacement correct 44 → 35 %, Total 58 → 48 %.
  • drift whole window, RETREAT: kept. Total Displacement correct 58 → 41 %.
  • drift HOURS (days measured enough): kept. Total Displacement correct 58 → 56 % (WILDSTRUBEL 29 → 26 %, 316 instants).
  • jumps, the targets together (K_TOGETHER): kept. Total Perturbation found 10 → 6 %.
  • jumps, the together series only as a one-measurement jump back: kept. WYOMING Perturbation correct 57 → 24 %.
  • thermal R2_MIN (the sinusoid check): kept. NIEDERHORN Thermal correct 87 → 67 %, WILDSTRUBEL 25 → 19 %.
  • slides, the corrected curves required: kept. MICHIGAN Thermal correct 47 → 22 %, Total Thermal correct 69 → 62 %.
  • slides, the raw positions required: kept. MICHIGAN Thermal correct 47 → 20 %.
  • RETURN replaced by EDGE: kept. Total Thermal found 81 → 74 % (JUNGFRAU 100 → 68 %, ALASKA, WILDSTRUBEL).
  • camera wave tier (_wave on x, y): kept. Total Thermal found 81 → 68 % (SNCF01, NIEDERHORN, FLORIDA, WILDSTRUBEL).

Before / after on the range

Events check (changed lines):

< 2026-09-28T00:00Z → 2026-11-01T23:50Z Displacement         kept | Slow drift | 8 sensors | absorbed: Slow drift 09-28T00:00, Slow drift 09-29T00:00, Slow drift 09-30T00:00, Slow drift 10-02T00:00, Slow drift 10-02T00:00, Slow drift 10-06T00:00, Slow drift 10-07T00:00, Slow drift 10-07T00:00, Slow drift 10-19T00:00
> 2026-09-29T00:00Z → 2026-10-25T23:50Z Displacement         kept | Slow drift | 5 sensors | absorbed: Slow drift 09-30T00:00, Slow drift 10-06T00:00, Slow drift 10-07T00:00, Slow drift 10-07T00:00, Slow drift 10-19T00:00
< 2026-10-01T07:50Z → 2026-10-01T20:50Z Thermal displacement kept | Camera thermal movement | 29 sensors | absorbed: —
> 2026-10-01T08:00Z → 2026-10-01T20:50Z Thermal displacement kept | Camera thermal movement | 29 sensors | absorbed: —
< 2026-10-06T18:10Z → 2026-10-06T20:50Z Thermal displacement kept | Camera thermal movement | 29 sensors | absorbed: —
< 2026-10-31T22:40Z → 2026-10-31T23:00Z Thermal displacement kept | Camera thermal movement | 29 sensors | absorbed: —

Range score, before → after:

Family found correct
Displacement 1422/1422 (100 %) → same 1422/4213 (34 %) → 1422/3215 (44 %)
No data 24/24 (100 %) → same 24/29 (83 %) → same
Obstruction 1/5 (20 %) → same 1/9 (11 %) → same
Perturbation — 0/92 (0 %) → same
Target issue 4068/4068 (100 %) → same 4068/4213 (97 %) → same
Thermal displacement 0/33 (0 %) → same 0/204 (0 %) → 0/183 (0 %)
Visibility 3/87 (3 %) → same 3/3 (100 %) → same

Benchmark

           CLARIDEN     Displacement          correct   42 →  44 %
           MICHIGAN     Thermal displacement  found     58 →  54 %  (1 instants lost)
           MICHIGAN     Thermal displacement  correct   29 →  47 %
           NEBRASKA     Thermal displacement  found     25 →  22 %  (1 instants lost)
           NEBRASKA     Thermal displacement  correct   62 →  58 %  (0 instants lost)
           Total        Displacement          correct   57 →  58 %
           Total        Thermal displacement  found     82 →  81 %  (16 instants lost)
           WYOMING      Thermal displacement  found     51 →  50 %  (10 instants lost)
           WYOMING      Thermal displacement  correct   92 →  91 %  (0 instants lost)

0 regression(s); complexity: 607 code lines, 46 constants → 606 code lines, 46 constants

For the user to decide

  • BACK_H and the "Jump, not back yet" variety: removing them changes no figure on the benchmark, and the CLAUDE.md pruning rule would remove them. I kept them because labeling/families.md lists the variety for the client, and without it the jumps of the last 24 h in live use would be called "Lasting shift ... for more than a day". Remove it if the variety is no longer wanted (and update families.md).
  • S2 loses 16 labelled Thermal instants in total (WYOMING 10, MICHIGAN 1, NEBRASKA 1, LENZSPITZE 4), all under the regression limits: slide instants where the raw and corrected moves were on different axes. MICHIGAN Thermal correct gains 18 points. I read a cross-axis move as not being the camera carrying the curves; another reading would keep it.

Not fixed

  • The remaining drift pieces at CLARIDEN (D-301-C 29/09→07/10 and 07→25/10, D-303-C 06→25/10, D-304-B 30/09→23/10, D-306-B 07→25/10): slow creeps of 3.5 to 4 daily amplitudes over 2 to 3 weeks. The pruned labels count them as the targets' back-and-forth wandering, apart from the two 4- to 5-day drifts. Tried: taking the shortest pieces first (same gain as S1, nothing more) and a retreat test inside the pieces (all pass, between 0.15 and 0.31). A maximum duration would drop CLARIDEN-74, whose targets only reach PIECE over a longer run (a found regression). The same thing happens at MICHIGAN (pieces of 25 days around the 4-day MICHIGAN-19).
  • The two remaining Thermal extras (10-01, 10-24): isolated slide instants joined within a day. A 3 h join lost LENZSPITZE (−25 points found, 573 instants) and WYOMING (−20 points): regression.
  • Visibility misses (8 labels) and the Perturbation at 31/10 22:50 that depends on them: the error_value signal is under the diffuse threshold and below a window-wide baseline (see Diagnosis). A baseline local in time (for example the median of the day before) is a new mechanism that would need its own benchmark trial.
  • Obstruction from a single rejected reference inside a Visibility label (PR-295, 31/10): Obstruction and Visibility look the same from one sensor's error_value. The families document decides by what is in front of the reference, which only the images show.

Limits

  • CLARIDEN-35 (2026-10-27T12:00Z → 12:20Z, Target issue): the label rests on PR-284's spot being weaker on the thumbnails since 24/10, with no rejection. It would take the images or a long-term error_value trend per sensor.
  • CLARIDEN-65 (2026-10-29T23:50Z → 2026-10-30T00:10Z, Target issue): a change of starting position (configuration) with no movement of the raw positions. It would take the configuration or the raw positions next to the relative displacement.
  • CLARIDEN-68 (2026-10-31T09:20Z → 15:00Z, Thermal displacement): the camera scale and pan follow the housing temperature for one late morning, with no daily cycle. It would take the housing temperature and the camera pose, which the detectors do not read.
  • Visibility labels CLARIDEN-12, 55, 61, 69, 70, 71: the cause is not established even for the analyst (the "usual group" bump, nothing on the images). The error_value barely moves, so they are recognised by their signature on the curves.
  • The report says the D-302-B and PR_BG jumps between two levels (1/10, 5/10, 11/10, 14/10) belong to that target and no label covers them. The detectors' Perturbation of 05/10 10:30–23:50 is one of them.
  • The report names CLARIDEN-14 for the 06→11/10 drift. The labels file has CLARIDEN-74 at those bounds, which I took as the same label.

Tools

  • sessions/CLARIDEN_2026-10-01T0000_2026-11-01T0000_20261118T1219Z/tools/drift_dump.py <detectors> <station> <from> <to> [kind|label]: the raw episodes of each detector over a window (3 days of history). Worth keeping.
  • tools/days.py <detectors> <station> <from> <to> [sensors]: the daily levels of the slow drift in daily amplitudes, the whole-window test and the pieces. Worth keeping for drift work.
  • tools/drift_all.py <detectors> <labels folder> <data folder> [stations]: drift episodes against the Displacement labels on every labelled station. Worth keeping.
  • tools/vis_z.py <detectors> <station> <labels.jsonl> <from> <to> [family]: around each label, the median error_value z, the "high" and rejected counts. Worth keeping for Visibility work.
  • tools/slides.py <detectors> <station> <from> <to>: the slide instants of thermal_displacement and their axes. Useful once.
  • tools/groups.py <detectors> <station> <from> <to> and tools/trace.py … <sensor>: the events with their episodes, and where the episodes of one sensor go. Worth keeping.
  • tools/table.py <detectors> <station> <labels.jsonl> <from> <to>: the diagnosis table (labelled, found, flagged, wrongly) with the missed labels and wrong events. Worth keeping.
  • tools/variant.py <src> <dst> <file> <old> <new> … and tools/bench_many.sh <reference> <variants…>: the pruning (one copy per rule, benchmarks 6 at a time, then compare). Worth keeping.

Difficulties

  • One edit to a working copy failed because the file had not been read in this session, and the first e1 benchmark ran on the unchanged copy. I stopped it and reran it. No effect on the results.
  • The report cites CLARIDEN-14, which is not in the labels file (CLARIDEN-74 has its bounds).