# Modification **Verdict**: changed **Changed**: scripts/target_issue.py, thresholds.md ## Diagnosis NORDEND, 2026-08-17 → 2026-11-08 (UTC), one measurement every 15 min, 19 targets and 3 references; 204 labels touch the range. | Family | labelled | found | flagged | wrongly | |---|---|---|---|---| | Displacement (4 labels) | 4 | 0 | 1 | 1 | | No data (28) | 56 | 22 | 22 | 0 | | Obstruction (14) | 2956 | 936 | 1994 | 1058 | | Perturbation (9) | 26 | 2 | 39 | 37 | | Target issue (3) | 7815 | 4285 | 4290 | 5 | | Thermal displacement (77) | 6940 | 4779 | 5299 | 520 | | Visibility (69) | 2092 | 893 | 2045 | 1152 | (instants of the range score; "flagged" = instants the detectors put in the family, "wrongly" = flagged with no label of the family) - **Target issue PR04, NORDEND-24 (08-17 → 10-01) and NORDEND-152 (10-01 → 10-26): partly missed, and partly in the wrong family** (`target_issue.py`). The detector finds a Degraded target on PR04 from 09-06 to 09-29, which is correct. It misses 08-17 → 09-05 and 09-30 → 10-19: on those days PR04 is rejected for 0 to 13 % of its measurements, below the daily `SHARE` (25 %). The label rests on the target's weak spot on the images and its noisier curve, not on the rejections (Limits). Its two shorter runs, 08-21 → 08-25 and 10-20 → 10-25 (5 and 6 days, under `WEEK`), come out as Target obscured (Obstruction): right sensor, wrong family. - **Target obscured / Degraded target on CTR01, PR09, PR07, built from rejections they share** (`target_issue.py`). CTR01 08-17 → 08-22, 09-24 → 09-26, 10-07 → 10-10, 10-13 → 10-14; PR09 09-24 → 09-26, 10-07 → 10-10, and Degraded target 10-17 → 10-25; PR07 08-24 → 08-25, 10-08 → 10-09, 10-23 → 10-25. These are nights when the left-edge spots fade together, a cobweb (NORDEND-167), bad weather (NORDEND-173/174, 213), or sunny afternoons. The labels put them in Visibility or Obstruction, or leave them unlabelled. families.md asks for rejections specific to the target, outside the episodes it shares with its neighbours. Only CTR01 from 10-17 on is right (NORDEND-195, correct). Because the score counts instants without looking at the sensor, these wrong-sensor Target obscured events supply about 880 of the 936 Obstruction "found" instants, all inside NORDEND-169 (PR17). That is why every fix to them shows up as a regression (Not fixed). - **Obstruction NORDEND-169 (PR17, mark on the window, 10-08 → 11-07, about 2900 instants): missed on PR17** (`displacement.py`, `visibility.py`). The step of 10-08 02:30 brings PR17's corr_y back to its level from before 09-05. `displacement.py` therefore reads 09-05 → 10-08 as one jump that came back (a Perturbation, absorbed by a Brief obstruction of 09-08 because its sensor is in it), not as a new event. PR17's error_value doubles from 10-08 to 10-25 but stays under visibility's "high" limit, which is set from the whole window and needs two sensors at once. Alternative reading for 09-05 → 10-08 (the label itself says the return is not established); the mark itself: Limits. - **Displacement NORDEND-250, 94, 309, 276 (camera steps or base changes kept afterwards, PR17 jump of 09-05): missed** (`displacement.py`). The camera steps are compensated down to a remainder below `K` (20 noises). PR17's jump is read as coming back on 10-08 (see above). These are 4 instants: small. - **Perturbation NORDEND-251, 80, 257, 310, 278, 279, 243: missed** (`displacement.py`). These are one-measurement jolts left by the compensation, under `K` per target and under `K_TOGETHER` for the targets together. Flagged without a label: one-measurement jumps of the 19 targets together, mostly at the edges of Visibility labels (37 instants). Small nuisance. - **Visibility, 37 of 69 labels without a Visibility event**, mostly 0.5 to 3 h: sun on the rock behind CTR01/CTR02/CTR03 on afternoons (NORDEND-321 to 333 and others), light dimming (269, 272, 273), weak spots at night (69, 325). The error_value hardly rises above each sensor's own level, so `visibility.py` sees nothing. Flagged wrongly: long Poor visibility zones built by chaining the high runs of single sensors that follow one another over days (09-21 → 09-22 on PR03 and PR12, 09-22 23:15 → 09-26 12:30 on 8 sensors, 10-18 → 10-19, 10-22 → 10-23). Nothing is labelled there; the error_value rises on one or two targets at a time without the curves moving. - **Thermal displacement: all 77 labels found (correct); 2161 instants missing at the bounds.** The labels run from morning to morning; the detector stops the contraction at `RETURN` and leaves the night out. Other stations label the night differently, so this is not a defect (see Not fixed). - **No data: 11 of 28 labels found; 17 missing**, two-measurement gaps (NORDEND-58, 62, 77, 192, 193, 203 to 205, 221, 225…). A hole only counts its two bounds; the events check shows the detected holes. No mechanism stood out beyond the existing `MISSING` rule; not pursued. ## What changed - **S1, commit 35b159a** (`scripts/target_issue.py`): removed the run-level condition `share < SHARE` (a run is kept only if at least SHARE of its measurements are rejected). The condition is now `len(run) < MIN_DAYS`. `share` is still computed for the text. In the docstring, "and SHARE of rejections over the run" is removed. - **S2, commit 0adadd5** (`scripts/target_issue.py`, `thresholds.md`): removed `MIN_HOURS = 3` (a day with fewer than 3 h of measurements did not count toward a run), with its `min_instants` computation, the `cadence` and `timedelta` imports, the `_runs` parameter and its docstring sentence, and its line in `thresholds.md`. ## Why - S1: a run is made of days that each have at least SHARE of their measurements rejected, plus at most BRIDGE days between them. So its overall share can only fall under SHARE through the bridged days, and that never happened on any labelled station. The condition was dead. - S2: a day measured for less than 3 h at most adds or bridges one day to a run. Removing the filter changes 1 Target issue instant and 4 Obstruction instants on one station, out of all the stations. The rule did not earn its constant. ## Checks - events (NORDEND range): identical before → S1 → S2. - sensors: identical before → S1 → S2. - range: identical before → S1 → S2. - benchmark (compare before → S2): 0 regressions. WILDSTRUBEL Obstruction correct 238/678 → 238/682 (35 % → 35 %); WILDSTRUBEL Target issue 2089/2091 → 2090/2091 found, 2089/2092 → 2090/2093 correct; Total Obstruction correct 1322/4869 → 1322/4873; Total Target issue 19359 → 19360 found. Complexity: 617 code lines, 49 constants → 611, 48. ## Pruning Rules of `target_issue.py`, each removed on its own copy, against the benchmark before: - run-level `share < SHARE`: removed, S1 (35b159a), no figure changes. - `MIN_HOURS` (the day filter): removed, S2 (0adadd5), no regression. - `MIN_DAYS` (removed: one-day runs become Target obscured): kept. Regression: Total Obstruction correct 27 → 26 % (396 wrongly flagged instants added). - `BRIDGE` (set to 0): kept. Regressions: NORDEND Target issue found 55 → 46 % (729 instants), FLORIDA Target issue found 97 → 90 % (193), NIEDERHORN Obstruction correct 35 → 21 % (331), Total Target issue found 84 → 80 %. - `WEEK` (the split between Degraded target and Target obscured) is part of the contract (target_issue gives Target obscured) and was not removed. `SHARE` is the definition of a degraded day and has no plainer value. ## Before / after on the range The events check is identical before and after (no line changed). Range score per family, before → after: Displacement 0/4, 0/1 → same; No data 22/56, 22/22 → same; Obstruction 936/2956 (32 %), 936/1994 (47 %) → same; Perturbation 2/26, 2/39 → same; Target issue 4285/7815 (55 %), 4285/4290 (100 %) → same; Thermal displacement 4779/6940 (69 %), 4779/5299 (90 %) → same; Visibility 893/2092 (43 %), 893/2045 (44 %) → same. ## Benchmark ``` 0 regression(s); complexity: 617 code lines, 49 constants → 611 code lines, 48 constants ``` ## For the user to decide - How the score counts the instants of NORDEND-169 (PR17, Obstruction, 10-08 → 11-07). About 880 of its "found" instants come from Target obscured events on CTR01, PR04, PR09 and PR07, which the labels put in Visibility (NORDEND-167, 173, 174, 213) or in Target issue for PR04 (NORDEND-152). Any change that gives these sensors their right family, or drops their shared episodes, shows up in compare.py as a NORDEND and Total Obstruction "found" regression. CLAUDE.md does not count that as a regression ("an instant found by an event on another sensor"), but the compare tool does. I did not commit such a change; the variants are under Not fixed. ## Not fixed - **PR04's short runs as Target issue** (08-21 → 08-25, 10-20 → 10-25). Counting the WEEK on the sensor's degraded days over the whole window, instead of per run, turns them into Target issue (NORDEND Target issue found 55 → 69 %). It also turns the shared runs of CTR01, PR09 and PR07 into Target issue (wrong sensor) and removes the Obstruction instants above: NORDEND Obstruction found 31 → 2 %, Total Obstruction found 31 → 10 %, correct 27 → 18 %. Dropped. `WEEK = 5` has the same effect (Total Obstruction found 31 → 23 %): dropped. - **Only the target's own rejections** (rejections at instants when at most 1, 2 or 3 other sensors, or a quarter of the sensors, are rejected), which is the families.md boundary. It removes the shared runs, but also the lost references and twins of the other stations: Total Target issue found 84 → 53 % (at 1 other), 75 % (at 2 or 3); SNCF01 and NIEDERHORN Target issue found down to 0–36 %. At a quarter of the sensors: Total Obstruction found 31 → 20 %. Dropped. - **`SHARE = 0.2`** (PR04 10-16 → 10-25 becomes a Degraded target) only adds 60 Target issue instants and costs Total Obstruction correct 27 → 25 %. **`BRIDGE = 2`**: NORDEND Target issue found 55 → 66 %, but regressions in NORDEND and Total Obstruction. Dropped (constants tuned to one range anyway). - **Thermal nights:** `RETURN = 0` (the contraction runs to the next start) brings NORDEND Thermal found 73 → 100 %, but Total Thermal correct drops 70 → 65 % (FLORIDA, NIEDERHORN, SNCF01, WILDSTRUBEL). The stations label the night differently. Dropped. - **Poor visibility chained across sensors (09-22 → 09-26):** zones that need two sensors high at the same instant, instead of chained runs, raise Total Visibility correct 69 → 76 % but lose found 56 → 52 % (regression). The variant where the core is extended by its spans gives 0 regressions and +1 point Total Visibility correct, but it does not break the 09-22 → 09-26 zone and it produces overlapping duplicate episodes. Not committed. - **Slow drift of PR16 over the whole benchmark window of NORDEND** (08-07 → 11-07, 8549 instants flagged as Displacement, Displacement correct 4/8549 in the benchmark). It does not appear on this range (a window starting 08-14 does not show it), so it is outside the evidence. Worth its own range. - No data two-measurement gaps, sunny-afternoon Visibility, one-measurement camera jolts: see Diagnosis; no simple general rule found. ## Limits - NORDEND-24 (2026-08-17T05:15Z → 2026-10-01T00:00Z, Target issue) and NORDEND-152 (2026-10-01T00:00Z → 2026-10-26T20:45Z, Target issue), on the days PR04 is rejected for under 13 %. The label rests on its weak spot on the images and its noisier curve. Seeing it would take a per-target noise level against the neighbours', or the images. - NORDEND-169 (2026-10-08T02:15Z → 2026-11-07T14:00Z, Obstruction): the mark on the window in front of PR17 is seen on the night thumbnails. From the measurements, only PR17's error_value doubling (10-08 → 10-25) and its step show it; after 10-26 its error_value is back to its usual level while the label goes on. Seeing it would take the images, or a per-sensor rule on a lasting change of error_value level, which would be a new rule for one case. - The sunny-afternoon and dimming Visibility labels (NORDEND-321 to 333, 269, 272, 273): the cause is seen on the thumbnails, and the error_value hardly rises. - The context report says NORDEND-283 (CTR01) and NORDEND-284 (PR17) duplicate the extended NORDEND-195 and NORDEND-169 and should be removed. They are not in the labels file read here. ## Tools - `sessions/NORDEND_2026-08-17T0515_2026-11-07T1400_20261118T1024Z/tools/labels.py`: labels of a JSONL touching a range (file FROM TO [chars] [family]). Worth keeping. - `.../tools/match.py`: label by label, the overlapping events (= same family, x other), then events with no label of their family (detectors_dir station labels FROM TO [family]). Worth keeping. - `.../tools/missed.py`: from a match.py output, labels without an event of their family, per family, with durations. Worth keeping. - `.../tools/daily_reject.py`: daily rejection share per sensor (station FROM TO sensors). Worth keeping. - `.../tools/own_reject.py`: daily share of rejections with at most K other sensors rejected at once (station FROM TO sensors K). Kept for the Target issue question. - `.../tools/daily_error.py`: daily median error_value per sensor and its share above visibility's "high" limit (station FROM TO sensors). Useful. - `.../tools/episodes_of.py`: raw episodes of one detector module before categories.py (detectors_dir station module FROM TO [sensor]). Worth keeping. - `.../tools/variant.sh` and `replace.py`: copy the detectors to a working folder, apply exact replacements, run the range score and the benchmark of the copy (WORK name [file old new]...). Worth keeping for pruning. - `.../tools/checks.sh`: the four checks on the live detectors plus compare (TAG PREV). Specific to this session. ## Difficulties - The S1 docstring edit left one line over the usual width. S2 rewrapped it in the same file; no figure is affected. - The score counts instants without the sensor, so the honest fixes to the Target obscured events always looked like Obstruction regressions (see For the user to decide).