115 lines
13 KiB
Markdown
115 lines
13 KiB
Markdown
# Modification
|
|
|
|
**Verdict**: changed
|
|
**Changed**: scripts/displacement.py, thresholds.md
|
|
|
|
## Diagnosis
|
|
|
|
WILDSTRUBEL, 2026-09-07 → 2026-11-02 (UTC), cadence 15 min, 7 targets and 6 references, 114 labels touching the range. Measurements stop on 2026-10-09 12:30 (outage to 10-31, apart from 10-15 08:00 and 10-31 20:15).
|
|
|
|
Range score before (instants; "wrongly" = flagged minus correct):
|
|
|
|
| Family | labelled | found | flagged | wrongly |
|
|
|---|---|---|---|---|
|
|
| Displacement | 534 | 500 | 1170 | 670 |
|
|
| No data | 29 | 29 | 43 | 14 |
|
|
| Obstruction | 716 | 153 | 609 | 456 |
|
|
| Perturbation | 44 | 0 | 1 | 1 |
|
|
| Target issue | 1519 | 1518 | 1519 | 1 |
|
|
| Thermal displacement | 250 | 169 | 446 | 277 |
|
|
| Visibility | 395 | 333 | 748 | 415 |
|
|
|
|
- **Correct**: WILDSTRUBEL-46, -130 (R3 rejected by day, Degraded target on R3); the No data labels (-69, -111, -119, -132, -137, -143, -154, -162, -176, -182, -192, -197, -199, -201, -234, -236). The Obstruction labels for brief passages (-51, -52, -53, -58, -59, -60, -65 to -68, -77, -78, -86, -94, -96, -103, -107, -116, -123, -125, -127, -141 to -150, -157, -160, -165, -166, -171, -172, -174, -180, -187, -196, -202, -229, -230) and most of the Visibility labels (-49, -50, -56, -57, -63, -135, -148, -186, -203, -215, -216, -228, …) are found too.
|
|
- **Wrong sensors, Displacement (the largest error)**: the Slow drift on PB2_2, 2026-09-04 00:00 → 10-01 21:30 (1168 instants). It came from the whole-window drift rule of `displacement.py` (`_whole`): PB2_2's corr_y goes down in three steps (09-08, across the 09-09 → 09-22 outage, 10-01), each step under half of the total, so the rule read it as a steady drift. No label puts PB2_2 in Displacement: from 09-24 its label is Obstruction (WILDSTRUBEL-81). It counted as "found" on WILDSTRUBEL-89 (PB1_2) and -120 (PB_5, PA3_2) only because the score works per instant, without the sensors (499 of the 500 found instants). On the range it accounts for 669 of the 670 wrong Displacement instants.
|
|
- **Missing, Obstruction**: WILDSTRUBEL-81 (PB2_2 partly covered for a week, 09-24 → 10-01, 79/640). The target is never rejected and its 09-24 jump is 14.6 noises, under `K` = 20. What shows the cause is the smaller spot on the thumbnails (see Limits). This label accounts for 561 of the 563 missed Obstruction instants.
|
|
- **Wrong family, Obstruction (Target obscured)**: PA_8 (09-07 → 09-09, 10-01 → 10-03, 10-09 → 10-15), PA_9 and PA1_2 (10-08 →), R2 (10-15 → 10-31). Sensors rejected by day in the sun become one continuous multi-day episode. The labels put these rejections under Visibility, or leave them unlabelled because only the points are missing. Removing Target obscured, or limiting it to each day's rejections, loses Obstruction "found" on NORDEND and WILDSTRUBEL (tried, see Not fixed).
|
|
- **Alternative reading, Thermal / Visibility**: the "Camera thermal expansion / contraction" wave runs every day (04:00 → 10:00, 13 sensors). The labels give Thermal displacement only on the days when PB1_2 and PB2_2 keep a remainder of the tilt on corr_y (-214, -218, -221, -106, -226, -121, -133, -138, -169). On the other days (09-07 to 09-09, 09-25 to 09-27, 10-03 to 10-09) they give Visibility or nothing. The labels also run to about 12:30, while the wave's contraction ends at 10:00 (found 169/250). From the camera's raw positions alone, the detector cannot tell which days the compensation leaves a remainder.
|
|
- **Alternative reading, Visibility / Obstruction**: Heat shimmer by day on 09-25 to 09-27 (inside -81 and -89, no Visibility label), and Brief obstructions inside Visibility labels (189 instants). This is the "Visibility or Obstruction" boundary of the families document, judged by extent.
|
|
- **Missing, Perturbation**: WILDSTRUBEL-153 (a common shift of the targets fading across the night outages, 0/43) and -136 (0/1). The return is slower than the one-measurement return that `K_TOGETHER` reads, and partly hidden in outages.
|
|
- **Missing, Displacement**: WILDSTRUBEL-183 (PB2_2 and PB1_2 lower after the 10-07/08 outage, 0/33) and -173 (PB1_2 step, 0/1). The steps are 3 to 6 noises, under `K`. -200 (one measurement after three weeks) is found.
|
|
|
|
## What changed
|
|
|
|
- **S1** (`fe00c33`): `scripts/displacement.py`. Removed the whole-window slow drift (`_whole`, tried before the pieces) and its constants `SIZE` = 2.0 and `RETREAT` = 1/3; the slow drift is now the pieces only (`PIECE` = 3.5 amplitudes, no step over half of it). Docstring comment updated. `thresholds.md`: lines `SIZE` and `RETREAT` removed.
|
|
- **S2** (`aea68fa`): `scripts/displacement.py`, `drift()`. Removed the condition "an axis needs at least two kept days" (`len(_days(...)[0]) >= 2`): with fewer than two days, `_pieces` already returns nothing. Comment updated.
|
|
- **S3** (`547519f`): `scripts/displacement.py`, `_pieces()`. Removed the tie-break of the piece order (`(-abs(d), j - i)` → `-abs(d)`): pieces of equal size keep their order by start.
|
|
|
|
## Why
|
|
|
|
- S1: the whole-window rule accepted a staircase of jumps as a steady drift whenever no single step exceeded half the total. On the benchmark it adds nothing: every instant it flagged is also flagged by a drift piece or by another sensor's event, so all figures are unchanged. Removing it takes out a source of drifts no label supports (here, a sensor that the labels say is obscured), plus one function and two constants.
|
|
- S2, S3: conditions with no effect on any output. Removing them simplifies the code.
|
|
|
|
## Checks
|
|
|
|
- events: the only change is one line removed, `2026-09-04T00:00Z → 2026-10-01T21:30Z Displacement kept | Slow drift | 1 sensors` (S1). S2 and S3 change nothing.
|
|
- sensors: the line `2026-09-04T00:00Z → 2026-10-01T21:30Z Displacement | Slow drift | PB2_2` is removed (S1). Nothing else changes.
|
|
- range: Displacement `500/534 (94 %)` → `1/534 (0 %)` found, `500/1170 (43 %)` → `1/2 (50 %)` correct (S1). All other families unchanged.
|
|
- benchmark: every figure unchanged after S1, S2 and S3. Complexity 609 code lines, 46 constants → 596 code lines, 44 constants.
|
|
|
|
## Pruning
|
|
|
|
Detector touched and most to blame: `displacement.py` (slow drift and jumps). Each rule was removed on its own copy and benchmarked, then compared with `compare`:
|
|
- whole-window drift (`_whole`, `SIZE`, `RETREAT`): removed, S1 `fe00c33`.
|
|
- "at least two kept days" on an axis: removed, S2 `aea68fa`.
|
|
- tie-break of the piece order: removed, S3 `547519f`.
|
|
- step condition of the whole-window drift (before S1): kept then removed with S1. Taken alone, its removal regressed CLARIDEN Displacement correct 44 → 35 % and Total Displacement correct 58 → 48 %.
|
|
- retreat condition of the whole-window drift (before S1): its removal regressed Total Displacement correct 58 → 41 %. Removed with S1 anyway.
|
|
- step condition of the pieces (half of `PIECE`): kept. Removing it regresses CLARIDEN Displacement correct 44 → 35 % and Total Displacement correct 58 → 24 %.
|
|
- `HOURS` (days measured at least 20 h of 24): kept. Removing it regresses Total Displacement correct 58 → 56 % and WILDSTRUBEL Displacement correct 29 → 26 % (316 instants).
|
|
- the pieces (whole-window only, before S1): kept. Removing them regresses CLARIDEN Displacement found 100 → 0 %, MICHIGAN 100 → 0 % and Total 98 → 66 %.
|
|
- the targets-together series (`K_TOGETHER`): kept. Removing it regresses Total Perturbation found 7 → 3 % and correct 5 → 3 %.
|
|
- `FLOOR` (noise floor): kept. Removing it regresses Total Perturbation correct 5 → 2 % (605 instants, FLORIDA).
|
|
- together series also for returns longer than one measurement (`a == b` removed): kept. Removing the condition regresses Total Perturbation correct 5 → 2 % and WYOMING Perturbation correct 61 → 23 %.
|
|
- `target_issue.BRIDGE` at 0 (second detector blamed, through Target obscured): kept. Removing it regresses FLORIDA Target issue found 97 → 90 %, NIEDERHORN Obstruction correct 37 → 22 %, NORDEND Target issue found 55 → 46 % and Total Target issue found 84 → 80 %.
|
|
|
|
## Before / after on the range
|
|
|
|
Events check, the changed line:
|
|
```
|
|
< 2026-09-04T00:00Z → 2026-10-01T21:30Z Displacement kept | Slow drift | 1 sensors | absorbed: —
|
|
```
|
|
|
|
Range score before → after, per family:
|
|
- Displacement: found 500/534 (94 %) → 1/534 (0 %); correct 500/1170 (43 %) → 1/2 (50 %)
|
|
- No data: 29/29 (100 %), 29/43 (67 %), unchanged
|
|
- Obstruction: 153/716 (21 %), 153/609 (25 %), unchanged
|
|
- Perturbation: 0/44 (0 %), 0/1 (0 %), unchanged
|
|
- Target issue: 1518/1519 (100 %), 1518/1519 (100 %), unchanged
|
|
- Thermal displacement: 169/250 (68 %), 169/446 (38 %), unchanged
|
|
- Visibility: 333/395 (84 %), 333/748 (45 %), unchanged
|
|
|
|
## Benchmark
|
|
|
|
```
|
|
0 regression(s); complexity: 609 code lines, 46 constants → 596 code lines, 44 constants
|
|
```
|
|
|
|
## For the user to decide
|
|
|
|
- The range's Displacement "found" drops from 500 to 1 instants with S1. The labels behind it are WILDSTRUBEL-89 (PB1_2, 09-25 02:30 → 09-29 23:00, Displacement) and WILDSTRUBEL-120 (PB_5 and PA3_2, 09-30 02:15 → 16:15, Displacement). They were counted as found only through a Slow drift on PB2_2, a sensor neither label names. CLAUDE.md lists this as not a regression ("an instant the score counted as found by an event on another sensor"). The benchmark does not move, because its WILDSTRUBEL window starts on 09-01, where a drift piece on the reference PB3_2 (08-29 → 10-01) covers the same instants. That PB3_2 piece is just as unsupported by the labels; it is left in place, since it comes from the pieces rule and removing that rule regresses (see Pruning).
|
|
|
|
## Not fixed
|
|
|
|
- Target obscured on sensors rejected by day in the sun (PA_8, PA_9, PA1_2, R2): Obstruction wrongly flagged over whole nights. I tried two changes. Removing Target obscured regresses NORDEND Obstruction found 43 → 31 %, WILDSTRUBEL 35 → 28 % and Total 42 → 32 %. One episode per day of rejections regresses WILDSTRUBEL Obstruction found 35 → 29 % and Total 42 → 38 %. Both dropped.
|
|
- The staircase drift itself (a jump over an outage taken as a drift piece): no rule on the size of the steps separates it from the labelled drifts of SNCF01, NEBRASKA and BREITHORN (their steps reach 0.38 to 0.43 of the drift, against 0.46 here). Any threshold between them would be fitted to this sample.
|
|
- Thermal displacement by day versus Visibility (alternative reading, see Diagnosis); WILDSTRUBEL-153 and -136 (slow common return across outages); WILDSTRUBEL-183 and -173 (steps of 3 to 6 noises, under `K` = 20, which was set on E-001).
|
|
|
|
## Limits
|
|
|
|
- WILDSTRUBEL-81 (2026-09-24 02:30 → 10-01 00:00, Obstruction): the cause (PB2_2's spot smaller, something covering it) is seen on the thumbnails. In the measurements there is only a jump under `K` and a slightly higher night `error_value`, with no rejection. Detecting it would take the spot size from the images, or a new variety on a lasting shift of a sensor's own `error_value` level.
|
|
- Thermal / Visibility by day: whether the compensation leaves a remainder of the camera's tilt on a few targets depends on the day. The labeller reads it on the curves and the images; the detector's daily wave, built from the raw positions, cannot.
|
|
- No label is called wrong by the context document (WILDSTRUBEL-199 had its description corrected, bounds unchanged).
|
|
|
|
## Tools
|
|
|
|
- `sessions/WILDSTRUBEL_2026-09-07T0000_2026-11-01T0000_20261118T1519Z/tools/match.py`: per label, the instants its family found and the other families flagged on it; per event, its wrong instants and the overlapping labels. Args: detectors dir, station, labels, from, to [, family]. Worth keeping.
|
|
- `.../tools/confusion.py`: the wrongly flagged instants per family, by the label families under them. Same args. Worth keeping.
|
|
- `.../tools/days.py`: the slow-drift daily levels of one sensor, plus what `_whole` and `_pieces` returned (`_whole` is gone since S1). Args: detectors dir, station, sensor, from, to. Needs a small update before reuse.
|
|
- `.../tools/drift_audit.py`: every Slow drift of the benchmark, with drift/amplitude, steps, gaps and its share inside Displacement labels. Args: detectors dir, labels dir, data dir. Uses `_whole`, so it needs updating after S1; worth keeping for drift work.
|
|
- `.../tools/jumpsize.py`: per measurement of a sensor, its distance in noises from the level before (as `_jumps` sees it). Args: detectors dir, station, sensor, axis, from, to [, history start]. Worth keeping.
|
|
- `.../tools/variant.py` and `.../tools/run_variants.sh`: apply one pruning variant to a copy of the detectors, then benchmark several copies in parallel. Specific to this session.
|
|
|
|
## Difficulties
|
|
|
|
- The context report keeps WILDSTRUBEL-70 (a step hidden in the September outage), but that label is no longer in `labeling/auto/WILDSTRUBEL.jsonl`: it was removed in the labeling commits 9ccd04d / de092c8. I followed the labels file.
|