Files
aimsight-labeling/auto/analyses/CLARIDEN_2026-10-01T0000_2026-10-11T0000/scripts/patch_analysis.py
T

49 lines
6.2 KiB
Python
Raw Normal View History

import sys
D=sys.argv[1]
t=open(D+"/analysis.md").read()
def rep(a,b):
global t
assert a in t, a
t=t.replace(a,b,1)
rep("## Verdict per old id", """**Requalification of 2026-11-17** (new rules: only what stands out from the noise of the corrected curves, 5 own noises): of the 16 labels, 12 kept as they are, 1 rewritten (CLARIDEN-47, a pointer to a removed label), 3 removed (CLARIDEN-5 and CLARIDEN-13, camera thermal movement absorbed by the compensation; CLARIDEN-48, D-303-B at 4.2 noises). 13 labels in `labels.jsonl`. Details in section 2 and in "Requalification". The text below is that of the verification, kept for its measurements.
## Verdict per old id""")
rep("### 2026-10-06T13:00Z → 2026-10-06T13:30Z (added C)","### 2026-10-06T13:00Z → 2026-10-06T13:30Z (added C, CLARIDEN-47; description rewritten at the requalification: its pointer to the step of the 8th, no longer labeled, now says that this step leaves D-303-B only a remainder within the noise)")
rep("### 2026-10-08T08:50Z → 2026-10-08T09:10Z (added D)","### 2026-10-08T08:50Z → 2026-10-08T09:10Z (added D, CLARIDEN-48: removed at the requalification, see section 2)")
rep("## 2. What I left without a label\n","""## 2. What I left without a label
### Removed at the requalification (2026-11-17)
- **CLARIDEN-5**, 2026-10-02T21:50Z → 2026-10-02T23:20Z, Thermal displacement: compensated thermal. The housing cools and the camera scale deviates, but the corrected curves do not keep it: every target beyond 5 noises inside the label belongs to the view obstruction CLARIDEN-45 (D-301-C x −11.2, D-304-B y −11.0 noises, last touched point 22:50); from 23:00 to 23:20, while the scale is at its strongest deviation, no target leaves 5 noises (`ranges.py --k 5`, level outside 21:30–23:20). A camera movement that the compensation absorbs is not labeled.
- **CLARIDEN-13**, 2026-10-06T18:40Z → 2026-10-06T22:40Z, Thermal displacement: compensated thermal, same reading. The deviations inside it are those of the view obstruction CLARIDEN-12 (D-301-C x −12.6, D-302-B/PR_BG x +9.1 noises, last touched 22:00); from 22:10 to 22:40, when only the scale is still away, no target beyond 5 noises.
- **CLARIDEN-48**, 2026-10-08T08:50Z → 2026-10-08T09:10Z, Displacement: under the threshold. The camera tilt step is absorbed by the compensation for every target; the remainder on D-303-B corr_y reaches +4.2 own noises at 09:00–09:10 (+0.039 px, about 0.12 mm; level 03:00–08:50, noise 0.0092 px), no other sensor beyond 5 noises at k=5, and none with `--rolling 6h`. Its single point at 5.1 noises (11:20) is outside the label and inside the slow drift CLARIDEN-14.
### Left without a label at the verification
""")
rep("## Difficulties","""## Requalification
Commands (from the repository root; `scripts/requal.py` runs `tools/scripts/ranges.py data/CLARIDEN --columns corr_x,corr_y --k 5 --start W1 --end W2 [--outside …] [--rolling …]` and keeps the ranges that overlap the label; with `COLS=corr_x_mm,corr_y_mm` the same in mm; outputs in `work/requal/part1.txt`, `part2.txt`, `mm.txt`, `C2.txt`). Deviations in own noises:
| id | family | window / level | strongest deviation inside the label | verdict |
|---|---|---|---|---|
| CLARIDEN-2 | Visibility | 1 Oct 00:00–14:00, level outside the label | D-302-B (PR_BG) y +10.7, D-301-C x −9.1 | kept |
| CLARIDEN-3 | Displacement | 1 Oct 09:00–2 Oct 02:30, level outside | D-306-B y −17.0, D-304-B y −10.9, D-303-B y −9.5 | kept |
| CLARIDEN-44 | Displacement | 2 Oct 03:40–3 Oct 12:00, level outside (the level reached on the 3rd) | D-303-B y −9.7 at the start, back to the level by the 3rd | kept |
| CLARIDEN-45 | Visibility | 2 Oct 15:00–3 Oct 05:00, level outside | D-301-C x −11.2, D-304-B y −10.8 | kept |
| CLARIDEN-5 | Thermal displacement | same window, level outside 21:30–23:20 | only the obstruction's points (to 22:50); none 23:00–23:20 | removed (compensated) |
| CLARIDEN-6 | No data | — | no measurement of any sensor at 07:50 | kept |
| CLARIDEN-46 | Displacement | 3 Oct 00:00–17:45, level outside 09:40–17:45 | P-301-B y +7.4 | kept |
| CLARIDEN-7 | Visibility | 3 Oct 08:00–17:45 (and 14:00–17:45) | D-302-B (PR_BG) y +16.3 (+5.6), P-301-B x +8.5 | kept |
| CLARIDEN-8 | No data | — | no measurement, image or metric for two days | kept |
| CLARIDEN-9 | Displacement | 3 Oct 08:00–5 Oct 20:00, level before the gap, merge 6h | D-306-B y +63.8, D-303-C x +61.1, D-304-C y −60.4 | kept |
| CLARIDEN-10 | Obstruction | 5 Oct 10:30–18:00, level outside | D-306-B y −25.8, D-303-C x +23.5, D-302-B x −21.1 | kept |
| CLARIDEN-11 | Obstruction | 5 Oct 11:20–18:00, level outside | D-306-B y +48.6, x −14.5 (effect of the lost reference on the targets) | kept |
| CLARIDEN-47 | Displacement | 6 Oct 06:00–18:00, level before the step | D-303-B y −8.2 | kept, description rewritten |
| CLARIDEN-12 | Visibility | 6 Oct 13:30–7 Oct 04:00, level outside | D-301-C x −12.1, D-302-B x +8.8 | kept |
| CLARIDEN-13 | Thermal displacement | same window, level outside 18:00–22:40 | only the obstruction's points (to 22:00); none 22:10–22:40 | removed (compensated) |
| CLARIDEN-48 | Displacement | 8 Oct 03:00–15:00, level before the step; also `--k 4`, `--k 3`, `--rolling 6h` on 7–9 Oct | D-303-B y +4.2 (none at k=5) | removed |
Notes. CLARIDEN-12 keeps its text (and its validation) although it ends on "see the thermal label of the same evening", which is no longer labeled: the pointer is a side remark, the label rests on the obstruction itself. CLARIDEN-44 says "see the 6th and the 8th" about how D-303-B follows the tilt: a fact of the data, not a pointer to a label; kept. CLARIDEN-11 names the rejected row C, but it is labeled for what the lost reference D-302-C does to the other targets, far beyond the threshold. `python3 labeling/scripts/validate.py` on the new `labels.jsonl`: 13 labels, 0 errors.
## Difficulties""")
rep("## Sources read\n","## Sources read\n- Requalification: `instructions/analyst.md`, `labeling/labeling-rules.md` (sections 1 to 3), `tools/GUIDE.md` (ranges), `work/requalify_input.jsonl`, this analysis and the report; `tools/scripts/ranges.py` and `inventory.py` on `data/CLARIDEN/`.\n")
open(D+"/analysis.md","w").write(t)