improve: S1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 16:40:52 +01:00
1 parent e03d911433
commit fc305697f7
1 file changed
+9 -2
+9 -2
View File
@@ -3,7 +3,7 @@
Usage: python3 tools/scripts/inventory.py data/PS_DES_COUDRES/ [--start T] [--end T] [--files]
The counts cover the whole period. With --start and/or --end, one more section lists, over this window,
the absent steps (dated, with the sensors that have no measurement) and, per sensor, the rejected measurements (out of
its measurements in the window; dated, in runs of consecutive steps; then the share rejected per UTC day; rejected:
its measurements in the window; dated, in runs of consecutive steps; then the share rejected per UTC day, and per UTC hour of the day; rejected:
error_value above the threshold, references included), then the number of
references retained by the compensation (inlier = 1; inlier empty over the window: reproj_err filled) at each instant
and, dated, the runs of instants where references are not (which ones, and why: rejected, inlier value,
@@ -248,7 +248,8 @@ def window(by, start, end):
if not any(m for _, m in partial):
print(" (none)")
print("Rejected measurements in the window, per sensor (rejected of measurements; start → end of each run of "
"consecutive steps, count), then the share rejected per UTC day (MM-DD:%):")
"consecutive steps, count), then the share rejected per UTC day (MM-DD:%), then the rejected per UTC hour of the "
"day, all days together:")
for s in names:
rej = [t for t in sorted(series[s]) if rejected(series[s][t])]
if rej:
@@ -261,6 +262,12 @@ def window(by, start, end):
days[t.date()][1] += rejected(m)
print(f" {s} per day, {sum(1 for v in days.values() if v[1])} of {len(days)} days with a rejection: "
+ " ".join(f"{d:%m-%d}:{100 * r / k:.0f}" for d, (k, r) in sorted(days.items())))
hours = collections.defaultdict(lambda: [0, 0])
for t, m in series[s].items():
hours[t.hour][0] += 1
hours[t.hour][1] += rejected(m)
print(f" {s} per UTC hour of the day, all days together (HH:rejected/measurements): "
+ " ".join(f"{h:02d}:{r}/{k}" for h, (k, r) in sorted(hours.items())))
if not any(rejected(m) for d in series.values() for m in d.values()):
print(" (none)")
refs = [s for s in names if is_reference(by[s])]