7.6 KiB
7.6 KiB
Modification
Verdict: changed Changed: scripts/thumbnails.py data.py: unchanged
What the analyst used
- Tools:
inventory.py(range, then for distances and mm/px),overview.py(range and 24-26/10, common, residuals,--rigidon 29/10),days.py --bounds --night 22-4 --smoothing 5,metrics.py,quality.py --common --step 1dand--labels … --outside,ranges.py --columns corr_x,corr_y --rolling 12 --merge 0min(requalification),thumbnails.py(sensors, and--zoneover the whole image), whole images throughls | grep. - Its own scripts (
scripts/):scan.py(per instant: rejections, retained references, pose, low flux, sensors off their rolling median by more than K own noises),edges.py,amp.py,drift.py(15-min medians against a base window),forgotten.py(instants where at least N sensors jump, outside the non-thermal labels),requal_instant.py(deviation of every target from its ±12 local level at an instant, in own noise),requal_hourly.py/requal_thermal.py(hourly median against a level window),requal_measure.py,build_labels.py,report_table.py,requal_write.py. - What got in its way ("Difficulties"):
thumbnails.py --sensorswith a sensor whosex,yare empty stopped on a Python traceback (min() iterable argument is empty);quality.py --outsidelists only image-metric drops, so it found the shifts of a far reference and the jumps with a whole flux with its own scan (forgotten.py).
Diagnosis
thumbnails.py: a requested sensor with no filledx,yanywhere in the export makesmeasurement()callmin()on an empty sequence, and the tool crashes. This happens in sensor mode and also in--zonemode (the crosses).check()only catches unknown names. On today's data the case cannot be reproduced on LENZSPITZE, because the re-pump of 2026-11-18 dropped 1023 and 8019 from the exports, so the tool now reports them as unknown sensors. The defect is still in the code for any station whose export leavesx,yempty for a sensor. I reproduced it on a test copy (below).quality.py --outsideonly covers the image metrics, which is its job. To list the instants where severalcorrjump outside the labels,ranges.py --rolling N --instants 2already does most of whatforgotten.py/scan.pydid. The guide does not point from one to the other. The fix would be one sentence inGUIDE.md, which I could not commit (see "Not fixed").
What I decided
thumbnails.py: changed. A sensor without anyx,yis left out with a printed line that names it and points to--zone. If no sensor is left and there is no--zone, the tool exits with a clear message.measurement()also needsyto be filled, not onlyx. One sentence is added to the docstring. Options and outputs are unchanged.quality.py: left. Making it reportcorrjumps would duplicateranges.py --instants.ranges.py: left.--rollingwith--instantsalready coversforgotten.py,scan.pyandrequal_instant.py, except for filtering by a labels file. The pointer belongs in the guide (proposed below).- Analyst scripts
requal_hourly.py,requal_thermal.py,drift.py,edges.py,amp.py: left where they are. They are hard-coded to this station and range, and mostly covered bysummary.py --step 1h,days.py --boundsandranges.py. Adding a tool for them would be a contraption for one range. - Nothing removed.
What changed
- S1, commit
9900604,scripts/thumbnails.py:- After
check("sensors", …), a new rule. Sensors with no measurement carrying bothxandyare printed (No x, y for … in the export: not placed (--zone X,Y,W,H looks at the scene around them).) and dropped from the sensor list. With no sensor left and no--zone, the tool exits withNo sensor left to centre a thumbnail on. measurement(): the filter goes fromm["x"] is not Nonetom["x"] is not None and m["y"] is not None.- Docstring: one more sentence saying such a sensor is left out and said so.
- After
Why
- Asking for thumbnails of a sensor that has no position in the export crashed the whole sheet with a traceback, including the other sensors and the
--zonemode. Now the sensor is named and skipped, the sheet of the others is drawn, and the analyst is pointed to--zone.
Checks
Checks: none. Trials, on the range, outputs in sessions/LENZSPITZE_2026-10-23T2355_2026-11-01T1140_20261118T1049Z/work/tools/:
- Test copy built by
tools/blank_xy.py data/LENZSPITZE 20261025 1006 <tmp>/LENZSPITZE: the 25/10 export withx,yof 1006 emptied, images linked. It lives in a temporary folder, now deleted. - Before (HEAD version) on the test copy,
--sensors 1006,1018:ValueError: min() iterable argument is empty. - After,
--sensors 1006,1018 --times 2026-10-25T05:01Z,2026-10-25T06:01Z --radius 40: oneNo x, y for 1006line, then the 1018 sheet (LENZSPITZE_thumbnails_1018_250501-250601.png, checked with Read: two thumbnails, spot centred). rc 0. - After,
--sensors 1006alone: the line, thenNo sensor left to centre a thumbnail on., rc 1, no traceback. - After,
--sensors 1006,1018 --zone 1200,1000,600,400: the line, then the zone sheet with only 1018 crossed (LENZSPITZE_thumbnails_zone1200-1000-600-400_1018_250601.png, checked with Read). rc 0.
Report commands rerun: 3, no failure. report.md cites no command. These are the analyst's thumbnails.py sheets, rebuilt from the names of the PNGs in its work/thumbs/, run on the real station with --out …/work/: sensors 1006,1018,1002,1009 on 25/10 05:01-07:00 (checked with Read, identical layout), sensors 1011,1017,1012,1006 at six times, and the whole-image --zone 0,0,3088,2064 at four times.
For the user to decide
- A sentence for
GUIDE.md, "quality" section, after the--outsidebullet: "It sees only the image metrics: jumps ofcorrwith a whole flux (a far reference that shifts, the basis that changes) come fromranges.py --rolling N --instants 2on the same range." I did not write it.GUIDE.mdcarries another session's uncommitted change, which I was told neither to commit nor to revert.
Not fixed
- The guide pointer above, from
quality.py --outsidetoranges.py --rolling --instants, for the same reason. - The restriction to instants outside the labels of a file (what
forgotten.pyadded) has no equivalent inranges.py. A--labels Foption for--instantswould need its guide entry in the same change, so it is blocked for the same reason. It may also not be worth a new option, since--outside T1/T2already exists for one episode.
Limits
- The original crash (1023) cannot be reproduced on today's LENZSPITZE data: the re-pump dropped 1023 and 8019 from the exports. The fix was tried on a test copy with one sensor's
x,yemptied.
Tools
sessions/LENZSPITZE_2026-10-23T2355_2026-11-01T1140_20261118T1049Z/tools/blank_xy.py: builds a test station folder from one day's export, withx,yemptied for chosen sensors and the images linked. Arguments:<station folder> <YYYYMMDD> <SENSOR,…> <new folder>. Run it withpython3 -I. Worth keeping to test any tool against a sensor without a position.
Difficulties
GUIDE.mdwas already modified by another session and must not be committed. Every fix that needs a guide sentence (theCLAUDE.mdrule: a new option enters the guide in the same change) was therefore out of reach. I kept to a fix that needs no guide change and put the rest under "For the user to decide".- The case in the evidence (1023) no longer exists in the data after the re-pump, so I built a test copy to reproduce it.
- The output folder already holds files from the detectors upgrader (
tools/,modification.md). My script sits next to theirs intools/.