Files
aimsight-optimizer/sessions/ALASKA_2026-11-04T2358_2026-11-16T1217_20261118T0951Z/summary.md
T

135 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# optimize: ALASKA, 2026-11-04 → 2026-11-17
**Result**: modification kept
**Tools changed**: scripts/metrics.py, scripts/inventory.py
## The range
- No data: found 0/2 (0 %) → 2/2 (100 %); correct — → 2/2 (100 %)
- Obstruction: found — → —; correct 0/14 (0 %) → 0/14 (0 %)
- Perturbation: found 1/256 (0 %) → 15/256 (6 %); correct 1/1 (100 %) → 15/18 (83 %)
- Thermal displacement: found 240/353 (68 %) → 240/353 (68 %); correct 240/949 (25 %) → 240/949 (25 %)
- Visibility: found 41/47 (87 %) → 41/47 (87 %); correct 41/162 (25 %) → 41/162 (25 %)
## Elsewhere
```
Total No data found 32 → 45 %
REGRESSION Total No data correct 80 → 77 % (13 instants lost)
Total Perturbation found 4 → 11 %
Total Perturbation correct 1 → 2 %
ALASKA No data found 0 → 100 %
ALASKA Perturbation found 0 → 6 %
ALASKA Perturbation correct 100 → 80 % (3 instants lost)
CLARIDEN No data found 46 → 62 %
CLARIDEN No data correct 92 → 83 % (2 instants lost)
FLORIDA No data found 19 → 29 %
JUNGFRAU No data found 14 → 21 %
JUNGFRAU Perturbation found 0 → 50 %
JUNGFRAU Perturbation correct 0 → 1 %
LENZSPITZE No data found 55 → 68 %
LENZSPITZE No data correct 71 → 52 % (9 instants lost)
LENZSPITZE Perturbation found 0 → 14 %
MICHIGAN Perturbation found 0 → 25 %
NIEDERHORN Displacement found 2 → 0 % (1 instants lost)
NORDEND No data found 17 → 38 %
NORDEND Perturbation found 4 → 8 %
SNCF01 No data found 33 → 40 %
SNCF01 No data correct 62 → 63 %
WILDSTRUBEL No data found 67 → 76 %
WILDSTRUBEL No data correct 73 → 74 %
WILDSTRUBEL Perturbation correct 20 → 14 % (2 instants lost)
WYOMING No data found 0 → 100 %
WYOMING Perturbation found 36 → 86 %
WYOMING Perturbation correct 100 → 57 % (9 instants lost)
1 regression(s); complexity: 603 code lines, 48 constants → 617 code lines, 49 constants
```
## What changed
- S1 (`ffd1c01`, `scripts/no_data.py`): `MISSING` 2 → 1; a hole is now two missing steps or more (it was more than two).
- S2 (`45795fd`, `scripts/displacement.py`): new rule "the targets together": a jump of the median over the targets (`K_TOGETHER = 5` noises) that is back at the next measurement is a Perturbation on all the targets.
- S3 (`ff3ef6a`, `scripts/displacement.py`): pruning, removed the condition "instant measured by at least half of the targets" in `_together()`.
- S4 (`7fc7755`, `scripts/displacement.py`): pruning, removed `back_n`; a return is now one measurement within half the jump of the level before.
- S5 (`751def0`, `scripts/displacement.py`): pruning, removed the 24 h limit on a return; `BACK_H` now only sets the hindsight that turns "Jump, not back yet" into "Lasting shift".
Upgrader's verdict: changed. Validator's verdict: keep.
## For the user to decide
From the modification, "Limits":
- ALASKA-4 (2026-11-05T23:45 → 2026-11-08T10:00) and ALASKA-10 (2026-11-14T03:00 → 2026-11-15T09:30), Thermal displacement on target 04. The labels rest on the raw image (04 shifting against the other prisms) and the housing temperature. Following one target with the cold needs the temperature series (`load_temperature`), which `thermal_displacement` does not read today.
- The context confirms the cause of the common jumps (a reference shifting) from the image and from WYOMING at the same instants. The detectors only see their signature on the corrected curves, so a common jump with a visible cause (vehicle, rain) would be labelled in another family.
- The analysis ends 2026-11-16T12:17 while the range runs to 11-17. The events after it (16 Nov Brief obstructions, 16 Nov thermal) have no labels and count as wrong.
- The report's label table still says "Displacement" for the jumps that come back. The labels file (the truth) says Perturbation, which is consistent with the families document.
From the modification, "For the user to decide":
- **No data Total correct 80 → 77 % (S1), shown as REGRESSION by `compare`; I count it as not a regression, from label bounds and merging.** Every new hole falls inside a No data label: CLARIDEN-34/57/58 (10-19 09:00, 10-19 20:40, 10-27 09:00), LENZSPITZE-2/20/21, ALASKA-7, WYOMING-12. The 13 extra "wrong" instants come from two places. First, label bounds: CLARIDEN-57 spans several holes, and its bounds are excluded from the score. Second, `MERGE` (1 h) joining two holes of one outage: LENZSPITZE 2026-10-15T22:55 → 10-16T02:10 and 03:10 → 03:40 now make one event, which flags the few measurements between them before LENZSPITZE-2 (starting 02:55). Against that, No data found rises +13 points. S1 also changes a user's rule (2026-10-23, "more than 2 missing steps"); the labels contradict that rule. To refuse S1, revert `ffd1c01`.
- S5 (the 24 h return limit removed) follows the families document ("what comes back, even after days, is a Perturbation"), but adds 97 wrong Perturbation instants at JUNGFRAU for one more instant found. To refuse it, revert `751def0`.
- The No data hole "up to the end of the window" (`no_data`, `end`) was kept even though removing it changes no figure: the benchmark never hits it, and aimsight-app relies on it for a station that is down now.
- The common-jump Perturbation is shown on all 12 targets (the median series has no sensor of its own). Its text is still "A target jumped and came back".
From the validation, "Reservations":
- Total, No data, correct 80 → 77 % (13 wrongly flagged instants added, all from S1), counted as "Not a regression":
- LENZSPITZE (71 → 52 %, 9 instants): on the night of the shared outage at the start of the history, the hole at 02:55 now joins the episodes before 02:10 and after 03:10, so the measured instants 02:10–02:55 are flagged. The label LENZSPITZE-2 (02:55–04:00) describes "several short gaps in a row" of the same outage, which began around 23:00. These are the bounds of a label and a gap of a few measurements within the same phenomenon.
- CLARIDEN (2), SNCF01 (1), WILDSTRUBEL (1): the new or extended No data events fall on labels (CLARIDEN-57, -58, -34; SNCF01-69, -78; WILDSTRUBEL-119, -154, -182). The extra instants are at their edges.
- In return, Total No data found 32 → 45 % (+32 labelled instants).
- S1 replaces the user's rule of 2026-10-23 ("more than 2 missing steps is a hole") with "2 missing steps"; `thresholds.md` says so. The user should know about this change.
- Per-station Perturbation drops under the threshold: WYOMING correct 100 → 57 % (9 instants, S2 and S4), ALASKA correct 100 → 80 % (3), WILDSTRUBEL correct 20 → 14 % (2), NORDEND correct −7 instants in S4. NIEDERHORN Displacement found 2 → 0 % (1 instant, S5). All are noise by the rule, and Total Perturbation correct rises.
## Not fixed
- Thermal displacement, ALASKA camera wave (709 wrong instants on the range; ALASKA-4/10 found only because the daily episodes cover 18 h out of 24 on every sensor). Removing the raw-position fallback regresses 8 lines elsewhere. Seeing "one target that follows the cold" would need a per-target rule against the housing temperature: a new part, and it would not be the daily wave.
- ALASKA-9: the slow two-day slide of a reference. Neither the jumps nor the 5-day drift see it. A multi-day common-mode drift rule would be new and is untested.
- ALASKA-1/3/5/6 are only partly found (6 %). The labels cover the whole night of agitation, while the detector flags each jump instant. Several jumps were also under 5 noises on the median series (e.g. 6 Nov 00:45, 07:15).
- Visibility extras at night (121 instants) and Brief obstructions (14 instants), not labelled.
## Reading tools
"What I decided":
- `metrics.py`: **changed**, new option `--weather [COLUMNS]` (S1). The weather goes into the existing table, r and PNG, next to the housing temperature, the targets and the pose. Weather is hourly like the metrics, so an option of this tool is simpler than a new tool. `weather.py` is not added: this option supersedes it.
- `inventory.py`: **changed**, one output string (part of S1). The weather title said "no tool plots it", which is now false. It now names `metrics.py --weather`.
- `metrics.py`: **changed**, new option `--sensors A,B` (S2). It adds each sensor's own `corr_x`, `corr_y` minus its level over the window as columns, with min/max and r on `--against`. They are drawn on the `tgt_corr_x` / `tgt_corr_y` panel next to the median. `slowfig.py` is not added: this option supersedes it, without the mm and with r.
- `common_dist.py`, `touched.py`, `devtable.py`: **left** in the analysis folder. They serve a threshold choice that belongs to the labelling rules, not the tools. `ranges.py --rolling --instants` already gives the per-sensor deviations per instant.
- Nothing removed.
"What changed":
- **S1** (`e17202d`):
- `scripts/metrics.py`: new option `--weather [COLUMNS]`.
- Without a value it uses `WEATHER = precipitation_mm,temperature_c,humidity_pct,wind_speed_kmh,sunshine_min`.
- It reads `data.load_weather` and adds one `w_<column>` column per weather column (table by step, per-column min/max, r and slope on `--against`, one PNG panel each).
- It prints where the weather was measured (station name, place, distance, height).
- Without `weather/`: "No weather/ in <folder>." An unknown column stops the run with the list of known columns.
- The weather columns do not count in "Steps without any metric".
- The docstring is updated.
- `scripts/inventory.py`: the weather title went from "…; tools/DATA.md, no tool plots it)" to "…; tools/DATA.md; metrics.py --weather)".
- **S2** (`84cfd69`), `scripts/metrics.py`: new option `--sensors A,B`.
- Unless `--metrics-only` is given, it adds `<S>_corr_x`, `<S>_corr_y` for each sensor: accepted measurements, minus the sensor's median over the window.
- These columns go into the table, the per-column lines and the r. In the PNG they share the panel of `tgt_corr_x` / `tgt_corr_y`, with a legend.
- An unknown sensor stops the run with the list of known sensors.
- The docstring is updated.
- Without the new options, the output is unchanged.
`data.py`: unchanged. Note from `tools.md`: `GUIDE.md` was already modified and was left alone, so the two new options are not in the guide yet; the lines it proposes are in `tools.md`, "For the user to decide".
## Scripts of the agents
From the modification, "Tools":
- `sessions/ALASKA_2026-11-04T2358_2026-11-16T1217_20261118T0951Z/tools/jumps.py <station folder> <iso instant>...`: for each target, the corr_x/corr_y jump from the median of the 4 previous measurements, in noises. Worth keeping, to size a jump against `K`.
- `sessions/ALASKA_2026-11-04T2358_2026-11-16T1217_20261118T0951Z/tools/holes.py <station folder> <labels.jsonl> <N>`: the holes of exactly N missing steps and the labels touching them. Worth keeping, to check `MISSING`.
- `sessions/ALASKA_2026-11-04T2358_2026-11-16T1217_20261118T0951Z/tools/checks.sh <n> <previous suffix>`: runs the four checks into `<check>-S<n>.txt` and diffs or compares them with the previous state. Session-specific; it has the paths hard-coded.
From the validation, "Tools": none.
## Errors
None.
- Files already modified: detectors: none; tools: `GUIDE.md` (left as it is).
- Detectors base: `1ca6557af2b5541d315baa0704a11b7f6a3898c8`; `git -C detectors log --oneline <base>..HEAD`:
```
751def0 improve: S5
7fc7755 improve: S4
ff3ef6a improve: S3
45795fd improve: S2
ffd1c01 improve: S1
```
- Tools base: `342728286f8028ac7337535ece5011bdf0d50d70`; `git -C tools log --oneline <tools base>..HEAD`:
```
84cfd69 improve: S2
e17202d improve: S1
```