# Modification **Verdict**: changed **Changed**: scripts/inventory.py **data.py**: unchanged ## What the analyst used - Tools: `ranges.py --k 5 --min-measurements 6` (with `--outside` and the mm columns) on PR04/PR03/PR05, CTR01, PR17/PR16/PR18; `summary.py --step 15min` on one night (PR17, PR16, PR18, PR01). - Own script: `scripts/rejections.py` (through `data.py`), for a sensor over a window: rejected / measurements (%), how many days have a rejection, and the share rejected on each UTC day. Every label in the analysis rests on these numbers ("1866 of 4229 (44 %), on 40 of 46 days", "59 %, every day (23 of 23), 83-97 % on …"). - What it lacked: the method of `GUIDE.md` (step 1) asks for "its share of rejected measurements and its hours, day by day", but no tool gave it. `inventory.py --start/--end` gave only the count and the dated runs. Over a range of several weeks that is one line of hundreds of runs per sensor, with no total and no share per day. The guide forbids own scripts, so the analyst had to break that rule to get them. `analysis.md` has no "documentation" or "Difficulties" section; the gap shows through the script. ## Diagnosis - Share of rejections (overall and per day) over a window: no tool returned it. The cause is the "Rejected measurements in the window" section of `inventory.py`: it prints the count and the runs, but not the sensor's measurements in the window nor any daily breakdown. ## What I decided - `scripts/rejections.py` (analyst): not added as a new tool. Its output goes into the existing section of `inventory.py` instead (the simplest: no new tool, no new option, the existing output stays and gets longer). - `inventory.py`: changed (S1), see below. - Other tools: left. `ranges.py` and `summary.py` did what was asked of them. ## What changed - S1, commit `7ada30a` (aimsight-tools), `scripts/inventory.py`, function `window`, section "Rejected measurements in the window": - the sensor line ` PR04 (N): runs…` becomes ` PR04 (N of M, P %): runs…` (M = the sensor's measurements in the window; the runs are unchanged); - a new line follows each sensor that has a rejection: ` PR04 per day, D of T days with a rejection: MM-DD:% MM-DD:% …`, the share rejected on each UTC day that has measurements of the sensor; - the section title and the module docstring say this. ## Why - The method asks for a sensor's share of rejected measurements, day by day. Before, only an own script gave it, against the guide. Now `inventory.py` on the window gives it, and `| grep '^ PR04 '` returns both lines of that sensor. ## Checks - `python3 tools/scripts/inventory.py data/NORDEND --start 2026-08-17T05:15Z --end 2026-11-07T14:00Z > …/work/tools/inventory.txt`: runs fine, 310 lines. Each sensor with a rejection now has the total and the daily line. - Matches the analyst's script on the same windows. PR04 17/08 05:15 → 01/10: `1866 of 4229, 44.1 %`, `40 of 46 days`, same daily values as `rejections.py` (`08-17:3 08-18:9 …`). CTR01 16/10 19:00 → 07/11 14:00: `1237 of 2086, 59.3 %`, `23 of 23 days`, the figures of the analysis. - `python3 tools/scripts/quality.py --self-test`: ok. - No PNG: inventory makes none. - Report commands rerun: 0. The report cites no `inventory.py` command, and `ranges.py` and `summary.py` were not touched. No failure. ## For the user to decide - `GUIDE.md` should get one sentence for this output. In the "inventory" section, after "by sensor, the rejected measurements, dated (…)", add: "with their number out of the sensor's measurements in the window and a line ` per day` (share rejected per UTC day)". The method step 1 could also cite it: "the share and the days: the ` per day` line of `inventory.py --start/--end`". I did not write it because `GUIDE.md` was already modified by someone else, and the request says not to commit it. The current guide text is still accurate, just incomplete. - The daily line covers every day of the window, including days at 0 %. Over months this makes a long line, but grep for one sensor still reads it. ## Not fixed none ## Limits none ## Tools none (the trials used the tools and the analyst's script directly) ## Difficulties - `/CLAUDE.md` wants a new output or option in `GUIDE.md` in the same change, but the request forbids committing `GUIDE.md` (already modified). So I chose a change to an existing output that needs no new option, and left the guide sentence to the user (above).