auto: labels requalified under the 5-noise rules (only what stands out from the noise): 32 analyses refined, the 6 paused periods verified, the long labels requalified with the fixes the period analysts found; 1153 -> 961 labels

- 32 analyses: each label kept, rewritten or removed by its analyst (section Requalification of the report; mm magnitudes where the targets have them)
- SNCF01 x3, WILDSTRUBEL 2026-09-01 -> 2026-10-06 x3: verified from their existing labels under the new rules
- long labels (no analysis): auto/analyses/long-labels/<STATION>/; NORDEND-169 and -195 run to 07/11, so NORDEND-283 and -284 (their continuation) are removed
- reading-rules.md, stations.md: the citations of removed or rewritten labels point to their successor, or to [expert]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-17 23:58:00 +01:00
1 parent c779de7720
commit ddb17c2189
321 files changed
+18464 -3426

No files matched your search

@@ -1,133 +1,120 @@
# Labels: JUNGFRAU, 2026-10-10T16:15Z → 2026-10-21T10:30Z (UTC)
Request: verify the 33 existing labels of the range (`work/existing.jsonl`): keep, correct, remove, add. DETECTORS: no. Result: 26 kept, 7 corrected, 0 removed, 0 added. The spanning label JUNGFRAU-2 (PM_G, Target issue) holds within the range.
Request: requalify the 33 labels of this analysis (`work/requalify_input.jsonl`) under the new rules (`labeling-rules.md`, section 1): only what stands out from the noise of the corrected curves. Not a new reading. Result: **33 kept as they are, 0 rewritten, 0 removed.** The detailed reading of the previous pass (verification of 2026-11-17, its verdict table and measures) is kept in `work/analysis.before-requalify.md`.
Weather: MeteoSwiss station Nyon / Changins, 2.0 km, 458 m (`data/JUNGFRAU/weather/`, hourly). Dry from 10/10 to 17/10 except a few tenths of a mm on 17/10 (12:00-13:00, 17:00, 20:00-23:00); nights 13/10 to 17/10 very humid (86-94 %). Continuous rain from 18/10 11:00 to 19/10 03:00 (up to 3.6 mm/h, humidity 91-97 %); dry 19/10 04:00 to 20/10 14:00 (humidity 78-91 %); rain again 20/10 15:00 → 21/10 10:00 (up to 1.9 mm/h, humidity 90-98 %). Sunny afternoons on 12, 14, 15/10 (60 min/h) and 16/10 (32-50 min/h).
Weather: MeteoSwiss Nyon / Changins, 2.0 km, 458 m (`data/JUNGFRAU/weather/`): dry 10-17/10 (a few tenths of a mm on 17/10), very humid nights 13-17/10; rain 18/10 11:00 → 19/10 03:00 and 20/10 15:00 → 21/10 10:00; sunny afternoons 12, 14, 15, 16/10. No image quality metrics on this camera.
No image quality metrics on this camera (the six columns `peak` … `snr` are empty, inventory), so `quality.py` gives nothing; visibility was read on the `error_value`, the images and the weather.
## Verdict per old id
| Old id | Verdict | Evidence |
|---|---|---|
| JUNGFRAU-33 | kept | corr_y of the targets rises from 10/10 16:00 (median -0.17) to 11/10 07:00 (+0.26), tilt 0.0230 → 0.0353, housing temperature 18.6 → 12.5 °C; starts at the range start, continuing JUNGFRAU-31. |
| JUNGFRAU-34 | kept | corr_y max 11/10 07:00, sinks to its trough by 16:00 (-0.04, hourly), tilt 0.0353 → 0.0244, temperature up to 21.8 °C. |
| JUNGFRAU-35 | **corrected**: start 18:00 → 16:15 | The only thermal pair of the range that did not touch: from 16:15 the tilt rises again (0.0246 → 0.0269 at 18:00) and the temperature drops (17.5 → 15.5 °C) while the targets' corr_y stays at its trough (y_targets -0.10 to -0.145 from 14:45 to 18:15). The pose moves, the cooling has begun: the cut goes at the turning point of the tilt, in the flat trough (labeling-rules 2, the phases touch). Description adapted. |
| JUNGFRAU-36 | kept | corr_y 12/10 07:30 max (+0.36) → 17:15 min (-0.22), corr_x of the targets up to +0.31 at 15:00, temperature to 20.4 °C. |
| JUNGFRAU-37 | kept | REF_G error_value 0.232 at 16:00 (level 0.085, 53 noises); corr_x jump of the three references (5-8 noises) and BJ_G, BL_C, BL_G (5-8 noises) at 16:00 only; 15:45 and 16:15 calm (rolling ranges, k 4). |
| JUNGFRAU-38 | kept | corr_y 17:15 min → 13/10 07:00 max, tilt 0.0271 → 0.0380, temperature 16.6 → 11 °C. |
| JUNGFRAU-39 | kept | REF_G error_value 0.18 at 01:00, 0.51-0.55 from 01:15 to 02:15, 0.41 at 02:30, 0.09 at 02:45; corr_x of the references shift at 01:15 (REF_CT 0.095 → 0.148), back at 02:45; BJ_G, BL_G, PBJ_C, PBL_C shift with them. REF_D stays at 0.33-0.35 until 03:45 (back 04:15) with no visible effect on the corr after 02:45. |
| JUNGFRAU-40 | kept | corr_y max 07:00, min 18:00 (-0.13), tilt 0.038 → 0.0204, temperature up to 21.5 °C. |
| JUNGFRAU-41 | kept | corr_y flat about -0.08 until 01:00, then rises to +0.07 at 08:00; tilt 0.0223 → 0.0322. |
| JUNGFRAU-42 | kept | REF_G 0.295 at 23:45, 0.53 from 00:00; references' corr_x shifted from 00:00 to 05:15 (REF_CT 0.114 → 0.142, then 0.08), back at 05:30 when REF_D returns (0.17 at 05:15, 0.13 at 05:30). |
| JUNGFRAU-43 | kept | corr_y max 07:15 (+0.07), min 17:00 (-0.52); corr_x of the targets +0.26 at 14:00; temperature up to 25.9 °C (11:00). |
| JUNGFRAU-44 | kept | One missing instant 09:30, image gap 09:15 → 09:45 (inventory). |
| JUNGFRAU-45 | kept | REF_G error_value 0.124 at 16:00 (45 noises), common corr_x jump at 16:00 only. |
| JUNGFRAU-46 | kept | corr_y 17:00 min (-0.52) → rises all night; tilt 0.0303 → 0.0336 at 06:00; end at the morning turning point (tilt down from 07:30, temperature up from 08:00). |
| JUNGFRAU-47 | **corrected**: end 07:45 → 08:00, description | Rejections end at 06:15, but REF_D, accepted again, is at 0.55, 0.44, 0.16, 0.50, 0.62, 0.34 (06:30 → 07:45), 0.27 at 08:00, 0.157 at 08:15 (level 0.14). The targets stay shifted in jolts with it (BJ_D corr_x 0.39 → 0.47 at 07:15; PBJ_C corr_x -0.074 until 07:45, -0.024 at 08:00): 07:45 is still touched, the end is 08:00. The description now says REF_D is seen poorly in jolts until early morning. |
| JUNGFRAU-48 | kept | corr_y 08:30 → min 17:00 (-0.52), corr_x +0.31 at 14:00, temperature to 23.4 °C. |
| JUNGFRAU-49 | kept | One missing instant 09:45, image gap 09:30 → 10:00. |
| JUNGFRAU-50 | kept | REF_G 0.142 at 15:45, still high at 16:00, common corr_x jump. |
| JUNGFRAU-51 | kept | corr_y rises from 17:00 (-0.52) to 22:00 (-0.27), stops at the gap. |
| JUNGFRAU-52 | kept | 46 missing instants 22:45 → 10:30, image gap of 705 min (inventory); metrics present all night. |
| JUNGFRAU-53 | **corrected**: description | "the camera housing temperature is the highest of the batch" is false: hourly maximum 25.2 °C on 16/10 (14:00), 25.9 °C on 14/10 (11:00). Replaced by "rises clearly in the early afternoon". Bounds and the rest hold (corr_y -0.05 → -0.44 at 17:00). |
| JUNGFRAU-54 | kept | One missing instant 13:45, image gap 13:30 → 14:00. |
| JUNGFRAU-55 | kept | REF_G 0.17 at 15:45 (62 noises), corr_x jump of BJ_G, BL_C, BL_G, PBJ_C and the references at 15:45 (5-8 noises). |
| JUNGFRAU-56 | kept | corr_y -0.44 (16/10 17:00) → +0.21 (18/10 08:00), weak dip 17/10 13:00-15:00; temperature 20 → 13 °C with only a weak bump on 17/10 (18 °C). |
| JUNGFRAU-57 | kept | REF_G 0.155 at 00:30, 0.39-0.54 from 00:45 to 02:45, back 03:00; REF_D 0.18-0.44 from 00:30, back 04:30; references' corr_x shifted from 00:45, last touch 04:30 (REF_CT 0.065 at 04:15, 0.110 at 04:30, 0.126 at 04:45). The start at 00:15 is one step early (00:30 barely moves), within the uncertainty. |
| JUNGFRAU-58 | **corrected**: description (cause) | "Mist probable" is contradicted: rain measured at Nyon, 2 km away, from 11:00 to 19/10 03:00 (up to 3.6 mm/h, humidity 96-97 %); on the 14:00 image the road is wet and the scene slightly veiled; 21:00 image veiled in grey with halos; 19/10 12:00 image dry and sharp. Bounds hold: error_value of the targets up from 10:15 (BJ_C 0.205 → 0.215 → 0.256 at 10:30), still high at 08:45 before the gap, back at 10:15 (BJ_C 0.187). The precedent JUNGFRAU-79 (wet road, same station) gives the same cause. |
| JUNGFRAU-59 | **corrected**: description | A No data states the image of the instant (labeling-rules 5): the image of 09:00, the first missing measurement, exists (inventory: image gap 09:00 → 10:15); added, it confirms the station runs. |
| JUNGFRAU-60 | kept | corr_y of the targets 0.20 (10:00) → 0.00 (20:00), tilt 0.0207 → 0.0191 at 11:00, temperature 15.4 → 16.5 °C; weak but present. From 16:15, the BJ part of the sinking is the nuisance of the corrected JUNGFRAU-61 (overlap allowed). Confidence medium. |
| JUNGFRAU-61 | **corrected**: family Thermal displacement → Visibility, start 20:00 → 19/10 16:15, description | Housing temperature flat (14.0-15.0 °C), pose flat (tilt 0.0212-0.0227), corr_y of the other targets flat: no thermal cycle that night. What moves is BJ_C, BJ_D, BJ_G, in step with their own error_value (mean 0.19 at 16:00 → 0.27 at 00:00 → 0.29 at 07:00 → 0.20 at 11:00): BJ_D - BJ_G corr_x 0.81 → 1.69 → 1.86 → 1.00, BJ_C corr_y -0.14 → -0.57 → -0.59 → -0.21. "Ordinary error_value" in the old description is false. Humid night after the rain (86-90 %), 00:00 image slightly veiled. First touched point 16:30, back at 11:00. |
| JUNGFRAU-62 | kept | Missing instants 20:45 and 21:15; images at 20:30, 21:00, 21:30 only. |
| JUNGFRAU-63 | kept | Tilt 0.0205 (09:00) → 0.0164 (13:00), temperature 15.8 → 17.3 °C, corr_y 0.083 (11:00) → -0.046 (16:00). |
| JUNGFRAU-64 | **corrected**: description (cause) | Rain at Nyon at 15:00 (0.1 mm) and from 17:00 to 21/10 10:00 (up to 1.9 mm/h, humidity 93-98 %); error_values of the targets up from 14:30 (BJ_C 0.219 → 0.228 at 14:15 → 0.256 at 14:30), REF_D and REF_G from 17:00; 21/10 00:00 image veiled in grey, 09:00 image damp and duller. "Mist probable" replaced by the rain; bounds hold. |
| JUNGFRAU-65 | kept | corr_y -0.06 (17:00) → +0.25 (21/10 10:00), temperature 16 → 11.4 °C; mixed with JUNGFRAU-64, as it says. |
| JUNGFRAU-2 (spanning) | holds within the range | PM_G rejected at all 978 instants; its error_value (level 0.44) between those of PM_C (0.51) and PM_D (0.35), following their variations. |
Targets (inventory, `targets.csv`): PBJ_C 3 m (0.61 mm/px); BJ_C, BJ_D, BJ_G 8 m (1.6 mm/px); PM_C, PM_D 21 m (4.3 mm/px); BL_C, BL_D, BL_G 34 m (6.8 mm/px); PBL_C, PBL_D 39 m (7.8 mm/px). Noise of the corr over the range: 0.007 to 0.023 px depending on the target (`work/requalify/full_rolling3.txt`).
## 1. My labels
The 26 kept labels are not repeated here (verdict table above). The corrected ones:
All the labels are kept with their id, bounds, family, description and review field. Per label, the largest deviation of a target (references excluded) in its own noises, at k 5 (`scripts/requalify.py`, `work/requalify/deviations.txt`): `roll` against the median of the 3 measurements on each side (as `ranges.py --rolling 3`), `pre`/`post` against the level of the hour before the start / after the end (the night level of a thermal phase). Measurements at the bounds excluded.
### 2026-10-11T16:15Z → 2026-10-12T07:30Z
- **Phenomenon of the catalogue**: The structure expands and contracts with the temperature
- **Precedents**: none useful beyond the neighbouring labels of the station (JUNGFRAU-36/38, 40/41 touch)
- **Family**: Thermal displacement: the pose follows the housing temperature
- **Measured**: tilt 0.0246 (16:00) → 0.0269 (18:00) → 0.0380 (12/10 06:00); y_targets flat -0.10 to -0.145 from 14:45 to 18:15, then rising; temperature 17.5 °C (16:00) → 11.5 °C (12/10 06:00)
- **Images**: none (nothing else moves)
- **Confidence**: high
### Thermal phases of the bridge (16 labels)
JUNGFRAU-33, 34, 100, 36, 38, 40, 41, 43, 46, 48, 51, 102, 56, 60, 63, 65
- **Phenomenon of the catalogue**: The structure expands and contracts with the temperature; A rise over several days with the drop in temperature (JUNGFRAU-56)
- **Precedents**: none needed: the rule is a threshold on the corr
- **Family**: Thermal displacement, unchanged: the corrected curves keep the movement, far beyond 5 noises from the night level; it is not a camera movement absorbed by the compensation
- **Measured** (deviation from the night level, noises): 33: 52 (PBJ_C corr_y); 34: 51; 100: 60; 36: 81 (PM_D corr_y); 38: 70; 40: 53; 41: 36; 43: 72; 46: 83 (with the reference loss inside; 51 at its start); 48: 66; 51: 36; 102: 41 (post level; starts at the resumption); 56: 71; 60: 27 with the BJ targets, 23 without them and before the BJ label (PBJ_C corr_y, 10:15 → 16:15); 63: 29 with, 11 without BJ and before the rain label (PBJ_C corr_y, 11:00 → 14:15); 65: 45 (BJ_C corr_y), 36 without BJ. In mm: about 1.5 to 4 mm a phase on PM_C, PM_D (corr_y), up to 2 mm on BL_G.
- **Images**: none (previous pass)
- **Confidence**: high: the weakest (63) still passes at twice the threshold outside any overlap
### 2026-10-14T23:00Z → 2026-10-15T08:00Z
- **Phenomenon of the catalogue**: Two references lost: the camera is blind
- **Precedents**: the existing label
- **Family**: Visibility (kept): nothing in front of the references, a very humid night
- **Measured**: REF_G 0.156 at 23:00 → rejected 01:45-04:00; REF_D rejected 02:00-06:15, then 0.55/0.44/0.16/0.50/0.62/0.34/0.27 (06:30-08:00), 0.157 at 08:15; no pose 02:00-04:00; targets jump at each switch (BJ_G corr_y +59 noises at 01:45); last shifted point 07:45
- **Images**: not looked at again
- **Confidence**: high on the end (REF_D and PBJ_C read at each step)
### Sun behind REF_G, one-measurement jump (4 labels)
JUNGFRAU-37 (12/10 15:45 → 16:15), 45 (14/10 15:45 → 16:15), 50 (15/10 15:30 → 16:15), 55 (16/10 15:30 → 16:15)
- **Phenomenon of the catalogue**: The sun in the field or behind a spot (here behind a reference: the base wobbles)
- **Family**: Visibility, unchanged
- **Measured** (rolling ±3): 37: BL_G corr_x 6.7, BJ_G 5.6 at 16:00; 45: PM_D corr_x 7.2 at 16:00 (15 against the hour before, PBJ_C); 50: PM_D corr_x 9.4 at 16:00; 55: PBJ_C corr_x 8.4, BL_G 8.4, BJ_G 7.8 at 15:45. Confirmed by `ranges.py --rolling 3 --k 5` on the whole range. About half a mm to 0.7 mm on BL, PBL.
- **Confidence**: high: above 5 noises on several targets at the same measurement
### 2026-10-16T10:30Z → 2026-10-16T16:45Z
- **Phenomenon of the catalogue**: The structure expands and contracts with the temperature
- **Precedents**: none useful
- **Family**: Thermal displacement
- **Measured**: temperature 20.4 → 25.2 °C (14:00), corr_y -0.05 → -0.44 (17:00), corr_x +0.17 at 14:00; the hourly maximum of the range is 25.9 °C, on 14/10 11:00
- **Images**: none
- **Confidence**: high
### References seen less well at night (4 labels)
JUNGFRAU-39 (13/10 01:00 → 02:45), 42 (13/10 23:45 → 14/10 05:30), 101 (14/10 23:00 → 15/10 08:00), 57 (17/10 00:15 → 04:45)
- **Phenomenon of the catalogue**: A reference loses its brightness, without an obstacle; Two references lost: the camera is blind (101)
- **Family**: Visibility, unchanged; these are not labels of missing points: the episodes move the corr of the other targets (the rule's exception, their descriptions already state that effect)
- **Measured**: 39: rolling 7.8 (BL_C corr_x 01:30), PM_C 7.7, PBL_C 7.6; 42: rolling 5.6 (BL_C corr_x 00:15), BL_G 5.4 at 02:45; against the levels outside, BJ_G corr_x 17.7 at 01:30, PBJ_C corr_y 16.5; 101: rolling 58 (BJ_G corr_y 01:45), up to about 3 mm on BL_G; 57: rolling 7.3 (PBJ_C corr_x 04:15), BL_C 6.5, PBJ_C 6.7 at 01:45.
- **Confidence**: high for 39, 101, 57; medium for 42, whose rolling deviation is close to the threshold (5.6), but whose shift of BJ_G and PBJ_C against the levels before and after (16-18 noises) holds
### 2026-10-18T10:00Z → 2026-10-19T10:15Z
### Rain, the whole scene (2 labels)
JUNGFRAU-103 (18/10 10:00 → 19/10 10:15), 106 (20/10 14:15 → 21/10 09:15)
- **Phenomenon of the catalogue**: Rain; Visibility drops over the whole scene
- **Precedents**: JUNGFRAU-79 (wet road at 15:00, rain, same station): same signature and cause; NORDEND-213 (rain then a night of poor visibility)
- **Family**: Visibility: the whole scene
- **Measured**: as the old label; rain at Nyon 11:00 → 19/10 03:00
- **Images**: 14:00 (road wet, scene slightly veiled, near spots haloed), 21:00 (background grey, halos), 19/10 12:00 (dry road, sharp)
- **Family**: Visibility, unchanged. The rejections of PM_C, PM_D, PBL_C that the descriptions mention are not what is labelled; the agitation of the corr is, and it passes far beyond the threshold
- **Measured**: 103: rolling 24 (PM_D corr_x 21:15), 49 against the levels before and after; up to about 2.7 mm (BL_C corr_x). 106: rolling 17 (PM_C corr_x 21/10 08:00), 40 (BL_C corr_x 22:30); up to about 3 mm (BL_C corr_x).
- **Confidence**: high
### 2026-10-19T08:45Z → 2026-10-19T10:15Z
- **Phenomenon of the catalogue**: A gap common to several stations
- **Precedents**: the existing label
- **Family**: No data
- **Measured**: 5 missing instants 09:00-10:00; image of 09:00 present
- **Images**: file listing
### Near spots seen less well on a humid night (1 label)
JUNGFRAU-105 (19/10 16:15 → 20/10 11:00)
- **Phenomenon of the catalogue**: Part of the scene goes dark at night (near spots)
- **Family**: Visibility, unchanged
- **Measured**: BJ_D corr_x 30 noises against the level before, 25 against the level after (06:30); rolling 6.6 (BJ_D 02:30). In mm, about 1 mm on BJ_D, BJ_G.
- **Confidence**: medium-high (as before: the link with their error_value is strong, the mechanism not seen)
### No data (6 labels)
JUNGFRAU-44, 49, 52, 54, 104, 62
- **Phenomenon of the catalogue**: The station runs, the measurement is missing (44, 49); A gap common to several stations (52, 54, 104, 62)
- **Family**: No data, unchanged: no measurement of any sensor at the missing instants (no accepted value inside 44, 49, 52, 54, 104; for 62, only the single measurement of 21:00 between two missing ones; inventory: image gaps at the same instants)
- **Confidence**: high
### 2026-10-19T16:15Z → 2026-10-20T11:00Z
- **Phenomenon of the catalogue**: Part of the scene goes dark at night / Visibility drops over the whole scene (here the three near spots above all)
- **Precedents**: NORDEND-150 ("a poorer view at night of the left-edge targets", Visibility); LENZSPITZE-16 (the large nearby spots jump when visibility drops)
- **Family**: Visibility rather than Thermal displacement (families.md, boundary "Thermal displacement or Visibility"): an error_value that rises clearly on the moving targets and a little on the others, a slightly veiled image, no temperature or pose change; there is no thermal cycle to explain the separation
- **Measured**: evBJ (mean of BJ_C, BJ_D, BJ_G) 0.193 (16:00), 0.197 (16:30), 0.217 (18:00), 0.275 (00:00), 0.293 (07:00), 0.237 (10:00), 0.200 (11:00), then 0.19-0.21 until 14:00; BJ_D - BJ_G corr_x 0.81, 0.87, 1.08, 1.69, 1.86, 1.36, 1.00; BJ_C corr_y -0.14, -0.18, -0.30, -0.57, -0.59, -0.40, -0.21 (BJ_D and BJ_G corr_y the same way); other targets (BL_D, PBL_D, PBJ_C) 0.193 → 0.224 → 0.185; temperature 14.0-15.0 °C; tilt 0.0212-0.0227; references calm (REF_G 0.07-0.09)
- **Images**: 20/10 00:00 (background slightly grey, nothing in front); BJ thumbnails 16/10 20:00, 19/10 14:00, 20/10 00:00 and 07:00 (large saturated spots, background greyer on the night of 20/10)
- **Confidence**: medium-high: the step-by-step link with the error_value is strong (scripts/bj_spread.py), the physical mechanism is not seen
### 2026-10-20T14:15Z → 2026-10-21T09:15Z
- **Phenomenon of the catalogue**: Rain; Visibility drops over the whole scene
- **Precedents**: JUNGFRAU-79
- **Family**: Visibility
- **Measured**: as the old label; rain at Nyon 15:00 and 17:00 → 21/10 10:00
- **Images**: 21/10 00:00 (grey veil), 21/10 09:00 (scene damp, duller), 20/10 15:00 (clear before)
- **Confidence**: high on the cause; medium on the start (the error_values rise from 14:30, before the rain of 17:00, with 0.1 mm at 15:00)
## 2. What I left without a label
- **17/10 16:00-21:15**: REF_G error_value up to 0.30 (level 0.085), with a shower at Nyon at 17:00 (1 mm). Effect on the corr at most 4-5 noises on one or two targets at a time (PBJ_C corr_x 17:45-18:15, BL_C), against 6-8 noises for the labelled reference nuisances (JUNGFRAU-39, 57): left under JUNGFRAU-56. A candidate if smaller ones are wanted.
- **14/10 14:30**: one-measurement base wobble (REF_CT corr_x -0.03, PBJ_C and PM_C +6 noises against the rolling level), REF_D 0.209 and REF_G 0.110 barely above their afternoon level, sunlight patches on the wall behind REF_CT on the thumbnail, in the strongest thermal afternoon. Left under JUNGFRAU-43; borderline.
- **14/10 21:30**: REF_D one-measurement error_value spike (0.16), no effect on any corr.
- **12/10 12:15-13:15, 14/10 09:45-15:45, 15/10 10:30-15:00, 16/10 11:00-15:30**: daytime rises of the REF_D / REF_G error_value (up to 0.19), no corr jump at 4 noises.
- **18/10 day**: no thermal phase: the housing temperature stays at 12.4-14 °C, and the drop of the tilt and of the corr_y comes with the rain (JUNGFRAU-58), which distorts the pose; the corr_y drop 08:00 → 10:00 (0.206 → 0.149) is small and ends where JUNGFRAU-58 begins.
- **Single instants flagged by the rolling ranges** at 10/10 18:00, 12/10 18:45, 15/10 22:45, 16/10 10:30-11:00: BJ jitter, noise, or the one-sided window at the edge of a gap (no jump on the 15-min table).
**Removed labels: none.** Every label passes the threshold of 5 own noises of at least one target over its range, or is a No data where the station delivers nothing. No label of this analysis rests only on missing points (the rejections of PM_C, PM_D, PBL_C in the rain and of REF_G, REF_D at night come with movements of the other curves beyond the noise), and no thermal label is a camera movement absorbed by the compensation (the corr keep 23 to 83 noises from the night level).
Left without label by the previous pass, unchanged: 17/10 16:00-21:15 (REF_G error_value up, corr at most 4-5 noises on one or two targets); 14/10 14:30 (one-measurement wobble, about 6 noises rolling, under JUNGFRAU-43); the daytime error_value rises of REF_D and REF_G; single-instant flags of the rolling ranges (10/10 18:00, 12/10 18:45, 15/10 22:45, 16/10 10:30). Not reopened (no new events sought).
## 3. The documentation
- Helpful: families.md, boundary "Thermal displacement or Visibility" (decided JUNGFRAU-61); labeling-rules 2 on touching structure phases (JUNGFRAU-35) and on reading the end on the curves, not on the rejections (JUNGFRAU-47); rule 5 on stating the image of a No data (JUNGFRAU-59); the instructions on the weather (JUNGFRAU-58, 64).
- **A finding for the knowledge**: on JUNGFRAU, the separation of BJ_D and BJ_G in corr_x (and the corr_y of BJ_C, BJ_D, BJ_G) follows the error_value of these three targets measurement by measurement: per-day correlation of (BJ_D - BJ_G) with their mean error_value 0.86-0.99 every day except 15/10 (0.62) and 20-21/10 (0.74); step to step r 0.63, slope about 7 px per unit of error_value (scripts/bj_spread.py, 970 steps). Their error_value is low by day and high at night, so their separation is larger every night. The existing thermal labels describe "BJ_D and BJ_G move apart on cool nights" as thermal (old JUNGFRAU-61, 63, 65); at least part of it is a measurement effect of these three large saturated spots nearest the camera, not a movement. Not settled: whether a thermal part remains (compare at equal error_value over several nights). stations.md could say that BJ_C, BJ_D, BJ_G are the large spots on the beams close to the camera.
- The precedent JUNGFRAU-79 (rain, wet road) and the weather contradicted the "mist probable" of JUNGFRAU-58 and 64.
- Missing: no tool plots the weather (read from the CSV).
- `labeling-rules.md` section 1 and `families.md` ("A gap", "What is not labeled") were clear for the decisions. The thresholds are generous for this bridge: the thermal phases are 25 to 80 noises, so no thermal label is threatened.
- What is not said: over which noise to measure (that of the label window, or of the batch). I used the batch noise (the noise of `ranges.py` over the whole range), steadier than the noise of a window of three measurements; the window noise of `ranges.py` on 12/10 14:00-18:00 gives the same verdict for JUNGFRAU-37 (BL_G 7.9 noises).
- For a label that overlaps another (60 and 105, 63 and 106), the rule does not say whether the threshold must be passed outside the overlap; I checked it outside, and it holds.
## Difficulties
- `summary.py` loses its header when piped through `tail`: the column order was recovered from the `--sensors` order.
none
## Sources read
- agents/agents/analyst.md, instructions/analyst.md, the request, work/existing.jsonl, work/spanning.jsonl
- instructions/analyst.md, the request, `work/requalify_input.jsonl`, the previous `analysis.md` and `report.md` (kept in `work/`)
- tools/GUIDE.md, tools/DATA.md, labeling/families.md, labeling/labeling-rules.md, labeling/reading-rules.md, labeling/stations.md
- labeling/auto/JUNGFRAU.jsonl (labels at the edges: JUNGFRAU-30 to 32, 66 to 69)
- precedents.py (2 queries): NORDEND-150, LENZSPITZE-16, JUNGFRAU-79, NORDEND-213, NORDEND-173, WILDSTRUBEL-120, FLORIDA-76
- data/JUNGFRAU: inventory, overview (whole range; rigid on 17/10), ranges (references error_value; rolling corr with instants), days --bounds, metrics, summary tables, weather CSVs (Nyon / Changins, 2.0 km), images 16/10 20:00, 18/10 14:00, 18/10 21:00, 19/10 12:00, 20/10 00:00, 20/10 15:00, 21/10 00:00, 21/10 09:00, thumbnails (references 14/10 and 12/10; BJ targets)
- scripts/bj_spread.py, scripts/bj_table.py, scripts/build_labels.py (this folder)
- data/JUNGFRAU: inventory (range), ranges (corr_x, corr_y, k 5, whole range, plain and rolling 3), the export through `scripts/requalify.py` and `scripts/mm_magnitudes.py`, weather of 18/10 (header)
## Requalification
Commands (from the repository root; outputs in `work/requalify/`):
- `python3 tools/scripts/ranges.py data/JUNGFRAU --columns corr_x,corr_y --start 2026-10-10T16:15Z --end 2026-10-21T10:30Z --rolling 3 --k 5 --merge 0min` → `full_rolling3.txt`; the same without `--rolling` → `full_level.txt`
- `python3 <folder>/scripts/requalify.py data/JUNGFRAU <folder>/work/requalify_input.jsonl 2026-10-10T16:15Z 2026-10-21T10:30Z` → `deviations.txt`; with `BJ_C,BJ_D,BJ_G` excluded → `deviations_without_BJ.txt`; on the sub-ranges 19/10 10:15-16:15 and 20/10 11:00-14:15 (`sub.jsonl`)
- `python3 <folder>/scripts/mm_magnitudes.py data/JUNGFRAU <folder>/work/requalify_input.jsonl` → `mm.txt`
- `python3 tools/scripts/inventory.py data/JUNGFRAU --start … --end …` → `inventory.txt`
| id | family | max deviation (noises) | verdict |
|---|---|---|---|
| 33 | Thermal | 52 (night level) | kept |
| 34 | Thermal | 51 | kept |
| 100 | Thermal | 60 | kept |
| 36 | Thermal | 81 | kept |
| 37 | Visibility | 6.7 rolling | kept |
| 38 | Thermal | 70 | kept |
| 39 | Visibility | 7.8 rolling | kept |
| 40 | Thermal | 53 | kept |
| 41 | Thermal | 36 | kept |
| 42 | Visibility | 5.6 rolling, 17.7 against outside levels | kept |
| 43 | Thermal | 72 | kept |
| 44 | No data | no measurement | kept |
| 45 | Visibility | 7.2 rolling | kept |
| 46 | Thermal | 51 at the start, 83 overall | kept |
| 101 | Visibility | 58 rolling | kept |
| 48 | Thermal | 66 | kept |
| 49 | No data | no measurement | kept |
| 50 | Visibility | 9.4 rolling | kept |
| 51 | Thermal | 36 | kept |
| 52 | No data | no measurement | kept |
| 102 | Thermal | 41 | kept |
| 54 | No data | no measurement | kept |
| 55 | Visibility | 8.5 rolling | kept |
| 56 | Thermal | 71 | kept |
| 57 | Visibility | 7.3 rolling | kept |
| 103 | Visibility | 24 rolling, 49 outside | kept |
| 104 | No data | no measurement | kept |
| 60 | Thermal | 23 outside the BJ label | kept |
| 105 | Visibility | 30 against the level before | kept |
| 62 | No data | no measurement (one between) | kept |
| 63 | Thermal | 11 outside the rain label, without BJ | kept |
| 106 | Visibility | 17 rolling, 40 outside | kept |
| 65 | Thermal | 45 | kept |
`python3 labeling/scripts/validate.py <folder>/labels.jsonl`: 33 labels, 0 errors.
@@ -1,91 +1,84 @@
# JUNGFRAU: check of the labels of 10 to 21 October
# JUNGFRAU: labels of 10 to 21 October, requalified
You asked to verify the 33 existing labels of 10/10 16:15 to 21/10 10:30 (UTC): keep, correct, remove, add.
You asked to requalify the labels of 10/10 16:15 to 21/10 10:30 (UTC) under the new rules: keep only what stands out from the noise of the corrected curves.
## In short
The labels hold: 26 kept, 7 corrected, none removed or added; the two long bad-visibility episodes (18-19/10, 20-21/10) are rain, not mist, and the night of 19-20/10 is three near targets seen less well, not a thermal movement.
The curves cannot be trusted during the rain, the night of 19-20/10, the nights the references blur (13, 14, 15, 17/10) and a few sunny afternoons around 16:00.
No real movement of the structure is seen; the rest is the daily thermal cycle of the bridge.
All 33 labels stand out clearly from the noise: they all stay, unchanged.
Do not trust the curves during the two rain episodes, the night of 19 to 20/10 on the three near targets, the nights the references blur (13, 14, 15, 17/10) and the measurement around 16:00 on sunny afternoons.
No real movement of the structure is seen; the rest is the daily thermal movement of the bridge.
## What happened
**Daily thermal cycle (every day, confirmed).** The bridge sinks as it warms by day and rises as it cools at night. The camera is fixed to the bridge and follows. Over 16 to 18/10, as the weather cools, the bridge rises for two nights in a row. This is normal. One fix: on 11/10 the evening cooling starts at 16:15, not 18:00, because the camera starts to tilt back at 16:15.
**Daily thermal movement of the bridge (every day, confirmed).** The bridge sinks as it warms by day and rises as it cools at night. The corrected curves keep this movement well beyond their noise: about 1.5 to 4 mm per half-day on PM_C and PM_D (21 m from the camera), up to 2 mm on the BL targets (34 m). From 16 to 18/10, as the weather cools, the bridge rises for two nights in a row. This is normal.
**References seen less well at night (13, 14, 15 and 17/10, cause not established).** On these very humid nights without rain, two of the three fixed reference points (REF_G, REF_D) are seen less well. All targets then shift a little together. On 15/10 both references are lost for a few hours and every point is wrong. One fix: on 15/10 REF_D stays blurry, in jolts, until 08:00, not 07:45.
**Fixed reference points seen less well at night (13, 14, 15 and 17/10, cause not established).** On these very humid nights without rain, two of the three fixed reference points blur. The whole correction shifts and all targets move a little together: about 1 mm on the far targets. On the night of 14 to 15/10 both references are lost for hours: the targets jump by up to about 3 mm and every point is wrong.
**Sun behind a reference (12, 14, 15, 16/10, confirmed).** On sunny afternoons, around 16:00, the sun lights the background behind REF_G for one measurement. All curves make a small jump and come back.
**Sun behind a reference (12, 14, 15, 16/10, confirmed on the images).** Around 16:00 on sunny afternoons, the sun lights the background behind a reference for one measurement. All curves make a small jump, about half a mm on the far targets, and come back.
**Rain (18/10 10:00 to 19/10 10:15, and 20/10 14:15 to 21/10 09:15, confirmed).** The whole scene is seen less well. A target (PM_C) is often rejected and the curves are agitated. Rain was measured all those hours at the MeteoSwiss station of Nyon / Changins, 2 km away. The road is wet on the camera image. The two labels said "mist probable": they now say rain.
**Rain (18/10 10:00 to 19/10 10:15, and 20/10 14:15 to 21/10 09:15, confirmed).** The whole scene is seen less well; the curves become agitated, up to about 3 mm on BL_C. Rain was measured all those hours at the MeteoSwiss station of Nyon / Changins, 2 km away, and the road is wet on the camera image.
![The road is wet under the bridge on 18/10 at 14:00, during the rain](rain_20261018T1400Z.jpg)
Look at the shiny road surface at the bottom: it is dry on the next day's images.
Look at the shiny road surface at the bottom.
**Three near targets seen less well on a humid night (19/10 16:15 to 20/10 11:00, likely).** BJ_C, BJ_D and BJ_G are the three big spots closest to the camera. On this night after the rain, their recognition error rises. In step with it, BJ_D and BJ_G seem to move apart, and all three seem to drop. The temperature and the camera do not move that night. This label said "thermal": it is now "visibility". It is not a movement.
**Three near targets seen less well on a humid night (19/10 16:15 to 20/10 11:00, likely).** BJ_C, BJ_D and BJ_G, 8 m from the camera, are seen less well the night after the rain. In step with it, BJ_D and BJ_G seem to move apart by about 1 to 2 mm, and all three seem to drop. The temperature and the camera do not move that night: it is not a movement.
![Error of the three near targets (top) and their corrected curves (middle, bottom), 19-20/10](JUNGFRAU_error_value-corr_x-corr_y_BJ_C-BJ_D-BJ_G-PBJ_C_20261019T1015Z_20261020T1400Z.png)
The curves in the grey band mirror the error at the top, measurement by measurement. PBJ_C, farther away, stays flat.
The curves in the grey band mirror the error at the top, measurement by measurement.
**Missing measurements (5 gaps, cause not established).** On 14 and 15/10, one measurement is missing at this station only. On 16/10 (night and 13:45), 19/10 morning and 19/10 evening, the gap falls on the other stations too: a common cause outside the station. Small fix: the label of 19/10 now says the station's image of 09:00 exists.
**Missing measurements (6 gaps).** On 14 and 15/10, one measurement is missing at this station only, cause not established. On 16/10 (night and 13:45) and 19/10 (morning and evening), the gap falls on the other stations too: a common cause outside the station.
## What to do
Nothing on site. Do not trust the curves during the rain episodes and the night of 19 to 20/10. On BJ_C, BJ_D and BJ_G, keep in mind that their night level depends on how well they are seen.
Nothing on site. Do not trust the curves during the rain episodes and the night of 19 to 20/10.
## Not established
- **BJ_D and BJ_G at night.** Every day, the gap between BJ_D and BJ_G follows how well they are seen. They seem farther apart at night, when their error is higher. Earlier labels call this a thermal effect of cool nights. At least part of it is a measurement effect, not a movement. Comparing nights with the same error, at different temperatures, would show whether a real thermal part remains.
- **Why the references blur on humid nights** (13-17/10): a clear look at the reference prisms on site would settle it.
- **Why the references blur on humid nights** (13-17/10): a look at the reference prisms on site would settle it.
- **BJ_D and BJ_G at night**: part of their night spread follows how well they are seen, not a movement; comparing nights with the same error at different temperatures would tell.
## Verification
## Requalification
Kept: 26. Corrected: 7. Removed: 0. Added: 0.
Kept: 33. Rewritten: 0. Removed: 0.
- JUNGFRAU-35: start 18:00 → 16:15 (11/10). The camera starts tilting back at 16:15. The night's cooling must touch the day's warming, as on every other day.
- JUNGFRAU-47: end 07:45 → 08:00 (15/10), description completed. REF_D, accepted again after its rejections, stays blurry in jolts. The targets stay shifted until 08:00.
- JUNGFRAU-53: description. "The housing temperature is the highest of the batch" was false (14/10 was warmer). It now says the temperature rises clearly in the early afternoon.
- JUNGFRAU-58: description, cause. Rain was measured all those hours 2 km away and the road is wet on the 14:00 image. "Mist probable" becomes rain.
- JUNGFRAU-59: description. A label for missing measurements must say whether the image exists. The image of 09:00 exists, which shows the station was running.
- JUNGFRAU-61: family Thermal displacement → Visibility, start 20:00 → 19/10 16:15, description. The temperature and the camera are flat all night. Only BJ_C, BJ_D, BJ_G move, in step with their own rising error (the old text said "ordinary error"). The rise starts at 16:30.
- JUNGFRAU-64: description, cause. Rain was measured from late afternoon of 20/10 to the morning of 21/10. "Mist probable" becomes rain.
- Spanning JUNGFRAU-2 (PM_G always rejected): right within the range.
Each label was measured against the noise of its targets: the weakest are the one-measurement jumps and the night reference episodes, at 5.6 to 9.4 times the noise; the thermal phases are at 11 to 83 times; the rain and the loss of references at 17 to 58 times. The six missing-measurement labels are moments when the station delivers nothing at all. None of the labels rests on rejected points alone.
## Labels
| Start (UTC) | End (UTC) | Family | Targets | In a few words |
|---|---|---|---|---|
| 2026-10-10 16:15 | 2026-10-11 07:30 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-11 07:30 | 2026-10-11 16:15 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-11 16:15 | 2026-10-12 07:30 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-12 07:30 | 2026-10-12 17:45 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-10 16:15 | 2026-10-11 07:30 | Thermal displacement | bridge targets | cooling, the bridge rises |
| 2026-10-11 07:30 | 2026-10-11 16:15 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-11 16:15 | 2026-10-12 07:30 | Thermal displacement | bridge targets | cooling, the bridge rises |
| 2026-10-12 07:30 | 2026-10-12 17:45 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-12 15:45 | 2026-10-12 16:15 | Visibility | REF_G, then most targets | sun behind a reference, one-measurement jump |
| 2026-10-12 17:45 | 2026-10-13 07:15 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-12 17:45 | 2026-10-13 07:15 | Thermal displacement | bridge targets | cooling, the bridge rises |
| 2026-10-13 01:00 | 2026-10-13 02:45 | Visibility | REF_G, REF_D, several targets | references seen less well at night, small shifts |
| 2026-10-13 07:15 | 2026-10-13 18:15 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-13 18:15 | 2026-10-14 07:45 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-13 07:15 | 2026-10-13 18:15 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-13 18:15 | 2026-10-14 07:45 | Thermal displacement | bridge targets | cooling, the bridge rises |
| 2026-10-13 23:45 | 2026-10-14 05:30 | Visibility | REF_G, REF_D, several targets | references seen less well at night, small shifts |
| 2026-10-14 07:45 | 2026-10-14 16:45 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-14 09:15 | 2026-10-14 09:45 | No data | all | measurements missing |
| 2026-10-14 07:45 | 2026-10-14 16:45 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-14 09:15 | 2026-10-14 09:45 | No data | all | one measurement missing |
| 2026-10-14 15:45 | 2026-10-14 16:15 | Visibility | REF_G, then most targets | sun behind a reference, one-measurement jump |
| 2026-10-14 16:45 | 2026-10-15 08:30 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-14 16:45 | 2026-10-15 08:30 | Thermal displacement | bridge targets | cooling, the bridge rises |
| 2026-10-14 23:00 | 2026-10-15 08:00 | Visibility | REF_G, REF_D, all targets | two references lost at night, curves invalid |
| 2026-10-15 08:30 | 2026-10-15 17:00 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-15 09:30 | 2026-10-15 10:00 | No data | all | measurements missing |
| 2026-10-15 08:30 | 2026-10-15 17:00 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-15 09:30 | 2026-10-15 10:00 | No data | all | one measurement missing |
| 2026-10-15 15:30 | 2026-10-15 16:15 | Visibility | REF_G, then most targets | sun behind a reference, one-measurement jump |
| 2026-10-15 17:00 | 2026-10-15 22:45 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-15 17:00 | 2026-10-15 22:45 | Thermal displacement | bridge targets | cooling, the bridge rises |
| 2026-10-15 22:45 | 2026-10-16 10:30 | No data | all | measurements missing, common to other stations |
| 2026-10-16 10:30 | 2026-10-16 16:45 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-16 13:30 | 2026-10-16 14:00 | No data | all | measurements missing, common to other stations |
| 2026-10-16 10:30 | 2026-10-16 16:45 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-16 13:30 | 2026-10-16 14:00 | No data | all | measurement missing, common to other stations |
| 2026-10-16 15:30 | 2026-10-16 16:15 | Visibility | REF_G, then most targets | sun behind a reference, one-measurement jump |
| 2026-10-16 16:45 | 2026-10-18 08:15 | Thermal displacement | bridge targets, camera | rise over several days as it cools |
| 2026-10-16 16:45 | 2026-10-18 08:15 | Thermal displacement | bridge targets | rise over several days as it cools |
| 2026-10-17 00:15 | 2026-10-17 04:45 | Visibility | REF_G, REF_D, several targets | references seen less well at night, small shifts |
| 2026-10-18 10:00 | 2026-10-19 10:15 | Visibility | all | rain, the whole scene seen less well |
| 2026-10-19 08:45 | 2026-10-19 10:15 | No data | all | measurements missing, common to other stations |
| 2026-10-19 10:15 | 2026-10-19 20:00 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-19 10:15 | 2026-10-19 20:00 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-19 16:15 | 2026-10-20 11:00 | Visibility | BJ_C, BJ_D, BJ_G | near spots seen less well on a humid night |
| 2026-10-19 20:30 | 2026-10-19 21:30 | No data | all | measurements missing, common to other stations |
| 2026-10-20 11:00 | 2026-10-20 16:00 | Thermal displacement | bridge targets, camera | warming, the bridge sinks |
| 2026-10-20 11:00 | 2026-10-20 16:00 | Thermal displacement | bridge targets | warming, the bridge sinks |
| 2026-10-20 14:15 | 2026-10-21 09:15 | Visibility | all | rain, the whole scene seen less well |
| 2026-10-20 16:00 | 2026-10-21 10:30 | Thermal displacement | bridge targets, camera | cooling, the bridge rises |
| 2026-10-20 16:00 | 2026-10-21 10:30 | Thermal displacement | bridge targets | cooling, the bridge rises |
@@ -0,0 +1,41 @@
"""For the report: per label, the largest deviation of each target in mm (corr_x_mm, corr_y_mm), the same three
levels as requalify.py (rolling ±3, hour before, hour after); prints the three largest targets per label.
Usage: python3 <this> data/JUNGFRAU labels.jsonl
"""
import json
import statistics
import sys
from datetime import timedelta
sys.path.insert(0, "tools/scripts")
import data # noqa: E402
folder, labels_path = sys.argv[1:3]
meas = data.load(folder)
for line in open(labels_path):
lab = json.loads(line)
a, b = data.parse_time(lab["start"]), data.parse_time(lab["end"])
best = []
for name, ms in meas.items():
if data.is_reference(ms):
continue
for col in ("corr_x_mm", "corr_y_mm"):
pts = [(m["t"], m[col]) for m in ms if a - timedelta(hours=2) <= m["t"] <= b + timedelta(hours=2)
and not data.rejected(m) and m[col] is not None]
pre = [v for t, v in pts if a - timedelta(hours=1) <= t <= a]
post = [v for t, v in pts if b <= t <= b + timedelta(hours=1)]
levels = [statistics.median(x) for x in (pre, post) if x]
top = (0.0, "")
for i, (t, v) in enumerate(pts):
if not (a < t.replace(second=0, microsecond=0) < b):
continue
nb = [w for _, w in pts[max(0, i - 3):i]] + [w for _, w in pts[i + 1:i + 4]]
lv = list(levels) + ([statistics.median(nb)] if nb else [])
for lvl in lv:
if abs(v - lvl) > abs(top[0]):
top = (v - lvl, data.iso(t))
if top[1]:
best.append((abs(top[0]), f"{name} {col[5]} {top[0]:+.1f} mm at {top[1][11:16]}"))
best.sort(reverse=True)
print(lab.get("id", "?"), lab["start"], lab["family"][:10], " | ".join(s for _, s in best[:3]))
@@ -0,0 +1,62 @@
"""Requalification: for each label, the largest deviation of a target's corr_x / corr_y in its own noises.
Usage: python3 <this> data/JUNGFRAU labels.jsonl START END [EXCLUDED,TARGETS]
Noise of a sensor: median of |difference| between two successive accepted measurements over START..END
(the definition of tools/scripts/ranges.py). Three deviations, targets only (references excluded), accepted
measurements strictly inside the label (its bounds are the measurement before / after):
roll : value minus the median of the 3 accepted measurements on each side (ranges.py --rolling 3);
pre : value minus the median of the accepted measurements of the hour ending at the label start;
post : value minus the median of the accepted measurements of the hour starting at the label end.
For a thermal phase, pre (warming) or post (cooling) is the night level.
"""
import json
import statistics
import sys
from datetime import timedelta
sys.path.insert(0, "tools/scripts")
import data # noqa: E402
folder, labels_path, start, end = sys.argv[1:5]
EXCLUDE = set(sys.argv[5].split(",")) if len(sys.argv) > 5 else set() # optional: targets left out
t0, t1 = data.parse_time(start), data.parse_time(end)
meas = data.load(folder)
series = {}
for name, ms in meas.items():
if data.is_reference(ms) or name in EXCLUDE:
continue
for col in ("corr_x", "corr_y"):
pts = [(m["t"], m[col]) for m in ms
if t0 - timedelta(hours=2) <= m["t"] <= t1 + timedelta(hours=2)
and not data.rejected(m) and m[col] is not None]
if len(pts) < 10:
continue
inside = [v for t, v in pts if t0 <= t <= t1]
noise = statistics.median(abs(b - a) for a, b in zip(inside, inside[1:]))
series[(name, col)] = (pts, noise)
for line in open(labels_path):
lab = json.loads(line)
a, b = data.parse_time(lab["start"]), data.parse_time(lab["end"])
best = {"roll": (0, ""), "pre": (0, ""), "post": (0, "")}
for (name, col), (pts, noise) in series.items():
if not noise:
continue
pre = [v for t, v in pts if a - timedelta(hours=1) <= t <= a]
post = [v for t, v in pts if b <= t <= b + timedelta(hours=1)]
lp = statistics.median(pre) if pre else None
lq = statistics.median(post) if post else None
for i, (t, v) in enumerate(pts):
if not (a < t.replace(second=0, microsecond=0) < b):
continue
nb = [w for _, w in pts[max(0, i - 3):i]] + [w for _, w in pts[i + 1:i + 4]]
cands = {"roll": statistics.median(nb) if nb else None, "pre": lp, "post": lq}
for k, lvl in cands.items():
if lvl is None:
continue
d = (v - lvl) / noise
if abs(d) > abs(best[k][0]):
best[k] = (d, f"{name} {col} {data.iso(t)}")
out = " ".join(f"{k} {d:+6.1f} ({w})" for k, (d, w) in best.items())
print(f"{lab.get('id', '?'):13s} {lab['start']} {lab['end']} {lab['family'][:10]:10s} {out}")