auto: the long labels requalified as analyses like the others, <STATION>_<start>_<end>/ with request.json (ex long-labels/<STATION>/); their labels carry the analysis; work/ out of git

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 07:16:59 +01:00
1 parent ddb17c2189
commit 764af7d8ec
132 files changed
+125 -9256

No files matched your search

@@ -0,0 +1,10 @@
# Requalification of the long labels: NORDEND
- **NORDEND-24** (Target issue, PR04, 17/08 05:15 → 01/10 00:00): **kept** as is. PR04 is rejected at 1866 of 4229 measurements (44 %), on 40 of 46 days, its own rejections (85–100 % daily from 18 to 28/09, 54–92 % on 21–23/08 and 06–08/09). Between the rejections its own curve leaves its level beyond the threshold, without its neighbours: `ranges.py --k 5` on the label, corr_x up to +8.8 noises (28/08 21:00, +0.11 px, about +5 mm), corr_y up to +7.5 noises (24–25/08); its own noise 0.013–0.014 px against 0.005 for PR03 and PR05.
- **NORDEND-152** (Target issue, PR04, 01/10 00:00 → 26/10 20:45): **kept** as is. 435 of 2467 measurements rejected (18 %), on 23 of 26 days, by day and by night; PR05 over the same range: 42 (2 %), on 4 days (the shared episodes 09/10 and 23–25/10). Its own noise 0.014 px against 0.005 for its neighbours ("twice as noisy" holds, understated). Its own curve beyond the threshold without its neighbours: corr_x −8.6 noises (25/10 21:45 → 26/10 09:45, about −5.5 mm), corr_y −9.9 and −7.1 noises (25/10 21:45 → 26/10 06:00, about −6.6 mm), the "last departure" of the text; the −35 noises of 25/10 01:30 are shared with PR03 and PR05 (rain, other label). Rejections stop on 26/10, the end on the curves holds.
- **NORDEND-169** (Obstruction, PR17, 08/10 02:15 → 01/11 00:00): **corrected** (end → 07/11 14:00, description), review removed. Beyond the threshold all along: `ranges.py --k 5 --outside 2026-10-08T02:15Z/2026-11-07T14:00Z` (level = the September plateau, 20/09–08/10), corr_y −28 to −44 noises (−0.17 to −0.27 px, −10 to −15 mm) almost without a break from 08/10 02:30 to 07/11 14:00; corr_x +20 to +23 noises (about +6.5 mm) from 08/10 to 13/10 00:15, then +7 to +27 noises in steps to the end. PR16 does not follow (its ranges are the daily cycle, a few noises). Rejections 37 of 2909 (1 %): the label stands on the movement, not on missing points. Corrections applied: (1) the end, 01/11 00:00, was a batch edge; the offset and the disc persist to the end of the analysed data, 07/11 14:00 (period analysis 24/10–07/11: night levels unchanged on 01–07/11, pale area under the spot on 04/11); (2) the "partial return on the evening of the 12th" falls inside the camera back-and-forth 12/10 22:30 → 13/10 00:15 (Displacement, period 30/09–13/10): at 23:00 PR17 corr_x 0.162 → 0.109, corr_y −0.032 → +0.016, while PR01 corr_y also rises (0.151 → 0.177) and comes back by 00:30 (0.146); PR17 does not come back (corr_x 0.09–0.10, corr_y about 0 until 01:30): its own step, coinciding with the camera movement, now stated.
- **NORDEND-195** (Target issue, CTR01, 16/10 19:00 → 01/11 00:00): **corrected** (end → 07/11 14:00, description), review removed. CTR01 rejected at 1237 of 2086 measurements (59 %) from 16/10 19:00 to 07/11 14:00, every day (23 of 23), 83–97 % on 23–24/10 and 31/10–02/11, 31–66 % on the other days; its own rejections (before 16/10 only sunny afternoons). Its accepted points do not leave their level by 5 noises (`ranges.py`, 0 ranges; noise 0.016–0.018 px), so the label rests on the rejection regime, kept as a target rejected most of the time every day. Correction applied: the end, 01/11 00:00, was a batch edge; the regime continues to 07/11 14:00 (01/11 96 %, 02/11 97 %, 03–07/11 33–66 %); the text "until the end of the month … almost without stopping in the last days" becomes the description of the extended range.
Overlaps to report: NORDEND-284 (PR17, 01/11 00:00 → 07/11 14:00) and NORDEND-283 (CTR01, same bounds), written by the analyst of the 24/10–07/11 period because 169 and 195 could not be changed, now lie entirely inside the extended 169 and 195: they become duplicates (one label per target and per regime) and should be removed from `labeling/auto/NORDEND.jsonl` when these corrections are submitted. (NORDEND-230, which that analyst had moved to 01/11, is no longer in `NORDEND.jsonl`.) Not changed here (out of scope: never written in `NORDEND.jsonl`).
Sources read: `tools/GUIDE.md`, `tools/DATA.md`, `labeling/families.md`, `labeling/labeling-rules.md`, `labeling/reading-rules.md`, `labeling/stations.md`, `input.jsonl`, `labeling/auto/NORDEND.jsonl` (NORDEND-230, 283, 284 and labels after 06/11), the analyses `NORDEND_2026-09-30T0415_2026-10-13T0745` (12/10 camera movements, NORDEND-152) and `NORDEND_2026-10-24T1630_2026-11-07T1400` (continuation of 169 and 195), `data/NORDEND/targets.csv`. Commands: `scripts/rejections.py` (rejection rates per day, through `tools/scripts/data.py`), `ranges.py --k 5 --min-measurements 6` on PR04/PR03/PR05 (both PR04 labels), CTR01, PR17/PR16/PR18 with `--outside` and the mm columns (`work/ranges_*.txt`), `summary.py --step 15min` on 12/10 21:30 → 13/10 01:30 (PR17, PR16, PR18, PR01). Labels written by `scripts/write_labels.py`; `validate.py`: 0 errors (one overlap flagged: 152 and 195, two different targets, expected).
@@ -0,0 +1,4 @@
{"start": "2026-08-17T05:15Z", "end": "2026-10-01T00:00Z", "family": "Target issue", "description": "PR04: its spot is much weaker than that of its neighbours PR03 and PR05, by day as by night (thumbnails of 14, 22, 26/08, 07, 12 and 23/09), and its error_value, already several times that of its neighbours, rises over the weeks. It is rejected almost every day, by day as by night, a good part of the time from 21 to 25/08 and from 06 to 08/09, almost without interruption from 18 to 28/09; the rejections become rare on 30/09. Between the rejections, its corr_x and corr_y curves are much noisier than those of its neighbours and change level, without the neighbours following. At night, lit cobweb threads pass over its area (23/09 image at 00:00), without explaining the whole range. The disturbance continues in October, weaker (next label, from 01/10). Cause not established (dirt, orientation, cobweb). This is not a movement: ignore its curve; check the target on site.", "review": "2026-11-17"}
{"start": "2026-10-01T00:00Z", "end": "2026-10-26T20:45Z", "family": "Target issue", "description": "PR04: usual error_value several times higher than that of its neighbours, scattered rejections almost every day, by day as by night, and corrected curves twice as noisy; the target is not hidden on the images. This is the continuation of a stronger disturbance in September, when it was almost always rejected. After the rain of 24 to 25, its error_value falls back to the level of the others during 26, after a last departure in early evening, and the rejections stop: the target (or whatever was soiling it) has probably been cleaned. Afterwards its curves, calm, stay lower than at the beginning of the month, in corr_x and in corr_y, until the end of the batch: the level measured during the disturbance is not a reference. Cause not established beyond that. Do not trust its curve over the range; check the target if it comes back.", "review": "2026-11-17"}
{"start": "2026-10-08T02:15Z", "end": "2026-11-07T14:00Z", "family": "Obstruction", "description": "PR17: a blurred pale disc (mark on the window lit by the infrared) sharpens just under its spot at 02:30 and covers part of it (thumbnails of 08/10 at 02:00 and 02:45, then of the following nights; still visible, weaker, on 26, 29 and 31/10, and as a pale area under the spot on 04/11). In one step, its corr_y drops and its corr_x rises markedly, only PR17 moves, its neighbours do not, and its error_value doubles and stays high. This step brings the corr_y of PR17 back to roughly its level from before its jump of 05/09 (separate label, Displacement, plateau until that day); but the September jump had only touched its corr_y, without raising its error_value, and no disc was visible then: the step comes from the mark, and that it also undoes the September plateau is not established. Its curves still change level in steps: a partial return at 23:00 on the 12th, in the middle of a back-and-forth of the camera from 22:30 to 00:15 (labelled separately, Displacement) that moves the other targets too; they come back after it, PR17 keeps its new level, so its step is its own and not the camera; then new offsets from 21 to 24. After the rain of 24 to 25, its error_value falls back to its earlier level, but its curves come back neither to their level of the beginning of the month (the September plateau) nor to that from before the jump of 05/09, and stay so until the end of the range, the disc still visible. Cause seen on the images; the exact nature of the mark is not established. This is not a movement of PR17; ignore its curve over the range, clean the window."}
{"start": "2026-10-16T19:00Z", "end": "2026-11-07T14:00Z", "family": "Target issue", "description": "CTR01 (local reference, read as a target): from the evening of the 16th, its error_value no longer falls back to its level of the beginning of the month and keeps rising until the end of the month, very close to the threshold then above it; the measurement is rejected a large part of the time, by night as by day, every day, almost without stopping from the end of October to the afternoon of 02/11, then still about half of the time until the end of the range; its curve is missing or stays very noisy. Before the 16th, it was only rejected on sunny afternoons and during the nights when the left-edge spots fade out (separate labels). On the images, its spot is weak; at the end of the month, blurred marks left on the window after the rain pass near it (26/10 image at 03:00), then a pale blurred band covers it (31/10 image at 03:00). Cause not established: state of the prism, or of the window in front of it, to be checked. Ignore its curve; intervene on the target."}
@@ -0,0 +1,10 @@
# NORDEND long labels: requalification
4 labels: 2 kept, 2 corrected, 0 removed.
- **NORDEND-169** (PR17, mark on the window) corrected: it now ends on 07/11 14:00 instead of the batch edge of 01/11, since the offset and the mark last until then; its text now says that PR17's step on the evening of 12/10 falls during a camera back-and-forth (labelled separately) but is PR17's own, since the other targets come back and PR17 does not. Magnitude: vertical offset up to about 15 mm against its September level (up to 44 noises), horizontal about 6.5 mm.
- **NORDEND-195** (CTR01, local reference) corrected: it now ends on 07/11 14:00 instead of 01/11; the target is still rejected every day (59 % of the measurements over the range, almost all on 01–02/11). The text now describes the extended range. CTR01 has no mm factor.
Kept: NORDEND-24 and NORDEND-152 (PR04): own rejections almost every day (44 % then 18 %), and its own curve moves beyond the threshold without its neighbours (about 5 to 6.5 mm).
To do on submission: NORDEND-283 (CTR01) and NORDEND-284 (PR17), 01/11 → 07/11, were written to carry these episodes past the batch edge; they now duplicate the extended 195 and 169 and should be removed.
@@ -0,0 +1,6 @@
{
"station": "NORDEND",
"start": "2026-08-17T05:15Z",
"end": "2026-11-07T14:00Z",
"hints": "Requalify the long labels of the station (work/existing.jsonl: those that no period analysis owns) under the new rules: keep, correct, remove."
}
@@ -0,0 +1,19 @@
"""Rejection rate of a sensor over a window, overall and per day: python3 rejections.py FOLDER SENSOR START END."""
import sys
from collections import defaultdict
sys.path.insert(0, "tools/scripts")
import data # noqa: E402
folder, sensor, start, end = sys.argv[1:5]
ms = data.filter_window(data.load(folder)[sensor], data.parse_time(start), data.parse_time(end))
days = defaultdict(lambda: [0, 0])
for m in ms:
d = days[m["t"].strftime("%m-%d")]
d[0] += 1
d[1] += data.rejected(m)
tot = sum(v[0] for v in days.values())
rej = sum(v[1] for v in days.values())
print(f"{sensor} {start} -> {end}: {rej}/{tot} rejected ({100 * rej / max(tot, 1):.0f} %), "
f"days with a rejection {sum(1 for v in days.values() if v[1])}/{len(days)}")
print(" ".join(f"{k}:{100 * v[1] / v[0]:.0f}" for k, v in sorted(days.items())))
@@ -0,0 +1,44 @@
"""Write labels.jsonl of the NORDEND long-label requalification: 24 and 152 kept as they are, 169 and 195 corrected."""
import json
import os
here = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
labels = {d["id"]: d for d in map(json.loads, open(os.path.join(here, "input.jsonl")))}
d169 = labels["NORDEND-169"]
d169.pop("review")
d169["end"] = "2026-11-07T14:00Z"
d169["description"] = (
"PR17: a blurred pale disc (mark on the window lit by the infrared) sharpens just under its spot at 02:30 and "
"covers part of it (thumbnails of 08/10 at 02:00 and 02:45, then of the following nights; still visible, weaker, "
"on 26, 29 and 31/10, and as a pale area under the spot on 04/11). In one step, its corr_y drops and its corr_x "
"rises markedly, only PR17 moves, its neighbours do not, and its error_value doubles and stays high. This step "
"brings the corr_y of PR17 back to roughly its level from before its jump of 05/09 (separate label, Displacement, "
"plateau until that day); but the September jump had only touched its corr_y, without raising its error_value, "
"and no disc was visible then: the step comes from the mark, and that it also undoes the September plateau is not "
"established. Its curves still change level in steps: a partial return at 23:00 on the 12th, in the middle of a "
"back-and-forth of the camera from 22:30 to 00:15 (labelled separately, Displacement) that moves the other "
"targets too; they come back after it, PR17 keeps its new level, so its step is its own and not the camera; then "
"new offsets from 21 to 24. After the rain of 24 to 25, its error_value falls back to its earlier level, but its "
"curves come back neither to their level of the beginning of the month (the September plateau) nor to that from "
"before the jump of 05/09, and stay so until the end of the range, the disc still visible. Cause seen on the "
"images; the exact nature of the mark is not established. This is not a movement of PR17; ignore its curve over "
"the range, clean the window.")
d195 = labels["NORDEND-195"]
d195.pop("review")
d195["end"] = "2026-11-07T14:00Z"
d195["description"] = (
"CTR01 (local reference, read as a target): from the evening of the 16th, its error_value no longer falls back "
"to its level of the beginning of the month and keeps rising until the end of the month, very close to the "
"threshold then above it; the measurement is rejected a large part of the time, by night as by day, every day, "
"almost without stopping from the end of October to the afternoon of 02/11, then still about half of the time "
"until the end of the range; its curve is missing or stays very noisy. Before the 16th, it was only rejected on "
"sunny afternoons and during the nights when the left-edge spots fade out (separate labels). On the images, its "
"spot is weak; at the end of the month, blurred marks left on the window after the rain pass near it (26/10 image "
"at 03:00), then a pale blurred band covers it (31/10 image at 03:00). Cause not established: state of the prism, "
"or of the window in front of it, to be checked. Ignore its curve; intervene on the target.")
with open(os.path.join(here, "labels.jsonl"), "w") as f:
for k in ("NORDEND-24", "NORDEND-152", "NORDEND-169", "NORDEND-195"):
f.write(json.dumps(labels[k], ensure_ascii=False) + "\n")