Files
aimsight-tools/GUIDE.md
T

64 lines
39 KiB
Markdown
Raw Normal View History

# Reading the data
The guide to the reading harness: followed by the analyst; improved by the tool-builder (agents repository), the only one that writes here.
A camera tracks targets (reflectors) fixed on a structure; its own movement is compensated thanks to reference targets, assumed fixed. This movement, the **camera pose** (`pan`, `tilt`, `rotation` in degrees, `scale`, `sigma0` of the registration, in `camera/`), is read before the sensors: it explains a large part of what moves on the curves (D-073). This guide says how to read a station's data: what the curves and the images show, moment by moment. It does not say what they mean: family, known event, hypothesis and verdict are the business of whoever calls you.
## Read first
- `labeling/knowledge/displacement-columns.md`: formats of the exports and meaning of the columns (**first**);
- `labeling/knowledge/gaps.md`;
- on a station whose export carries the image quality metrics (`peak` to `snr`: the "Export image quality" line of `inventory.py`), `labeling/knowledge/quality-metrics.md`.
## The tools
Run them from the root of the calling repository, where `tools/`, `data/` and `labeling/` are links. They return values, never verdicts: you judge.
| Command | What it returns |
|---|---|
| `python3 tools/scripts/inventory.py <folder> [--start T] [--end T] [--files]` | Files by type (beyond 5 per type: the count, the first and the last; `--files` for the full list, to be used only to look for a specific file), **what each source contains** over the window (columns of the export, of the pose and of `quality/`, with the number of rows that have a value, "empty" otherwise; names of the system metrics of `metrics/`; images and difference images; names and counts, never values), images: by runs of equal gaps between two images (within 5 min, over the window if given; one line per change of gap: a hole is dated by its two images), camera poses (count, period, measurement instants without registration), period, cadence, missing measurements, sensors (reference or target, error threshold, rejected measurements): these counts cover the **whole period**. With `--start`/`--end` (on a batch: those of the batch), one more section for the window: the missing steps, dated (for all the sensors, or which ones are missing), by sensor, the rejected measurements, dated (runs of consecutive steps), then the **number of references retained by the compensation** (`inlier` = 1) at each instant and the dated runs where some references are not, which ones and why (`r` rejected, `0` discarded by the compensation, `empty`). A measurement is rejected when its `error_value` exceeds the sensor's threshold, **references included**. When `pattern_type` is empty, a sensor is a reference if it carries `reproj_err` or `inlier` (the "pattern_type empty for N sensors" line says so); a column of the export that not all sensors carry says how many carry it. When `inlier` is empty over the window, the retained references are read from the filled `reproj_err` (the title says so); a mark other than `r` or `empty` is the value of `inlier` (e.g. `-1`). "Duplicate readings": an export (often named after the customer's project) whose readings are already in the others; with 0 different values, it changes nothing to the reading, otherwise the tools keep the one of the last file in name order. A run that ends the same day writes only the time of its end. The "Export image quality (peak to snr)" line says whether the six quality metrics are filled (then `quality.py`) or empty. Over a month, the output with `--start`/`--end` exceeds what a call displays: read each section through a pipe to `grep` (e.g. `\| grep -A40 '^Retained references'`, `\| grep '^ PR04 '`) |
| `python3 tools/scripts/summary.py <folder> [--column C] [--stat median\|min\|max] [--step 1h] [--level period\|window] [--sensors A,B] [--start T] [--end T] [--instants T1,T2] [--mark]` | Usual level of each sensor (median, MAD, min, max) over the whole period, or over the `--start`/`--end` window with `--level window` (for a batch: a level change within the batch is not compared with weeks of other measurements), then a table by time step. Columns: `error_value`, `corr_x`, `corr_y`, `relative_x`, `relative_y`, `x`, `y`, `sigma0`, `reproj_err`, and the six image quality metrics `peak`, `flux`, `sharpness`, `fwhm`, `dominance`, `snr` (raw values; against a calm reference, `quality.py`). The sensor header is repeated every 24 lines. `--mark`: `*` after the value when a measurement of the step is rejected (`x`, `y`, `error_value` of a rejected measurement stay filled), `o` when a measurement of the step has inlier = 0. `--instants T1,T2`: only the steps that contain these instants (the values of all the sensors at a few chosen times). With `--step` equal to the cadence, `--level window --mark`, it is the per-instant, per-sensor table of one column: one column per run |
| `.venv/bin/python tools/scripts/plot.py <folder> [--sensors A,B] [--columns C1,C2] [--start T] [--end T] [--zone T1/T2 ...] [--out D]` | A PNG of the series; each `--zone` is greyed; it prints its path. Columns: those of `summary.py`, quality metrics included (raw values). **Look at it with Read**: you read a chart better than a table |
| `.venv/bin/python tools/scripts/overview.py <folder> [--columns x,y,sigma0] [--column error_value] [--step 15min] [--k 5] [--min 5] [--residuals corr_x,corr_y,error_value\|no] [--outside T1/T2] [--others] [--rigid BASE [--without A,B] [--follow A,B]] [--table T1/T2\|no] [--sensors A,B] [--start T] [--end T] [--out D]` | All the sensors together, each against its median and its MAD over the window. Two PNGs: **common** (median across sensors of `x`, `y`, `sigma0`: with the dispersion across sensors as a grey band; on the `x`, `y` panels, in addition, **each global reference separately** (one line each) and the **median of the targets alone** (black line); and, at each step, the number of sensors whose `--column` exceeds its median by more than `--k` MAD; at the top, if the folder has `camera/`, the **camera pose**, raw values, one point per registration, the line cut at measurement instants without registration) and **multiples** (a small chart per sensor, one scale each: a step of a single sensor shows there). It also prints the **common median table** (one line per `--step`: the time and the deviation from the window median of `x`, `y`, `sigma0`, then `x_targets`, `y_targets` (median of the targets alone), then the raw camera pose, columns `cam_pan`, `cam_tilt`, `cam_rotation`, `cam_scale`, `cam_sigma0`, empty without registration) with the minimum and the maximum of each column and their instant, then those of `x`, `y` of each global reference (marked `(rejected)` when the measurement is, with the number of rejected measurements of the reference), then the measurement instants without pose (dated runs), then the instants where at least `--min` sensors exceed together, with their names. Three more PNGs, **residuals-corr_x**, **residuals-corr_y**, **residuals-error_value** (`--residuals`): a small chart per sensor of the column minus the sensor's own level (its median over the window; with `--outside T1/T2`, that of the rest of the window, outside the moment read), one scale each, zero dotted: a deviation of a few hundredths on `corr`, hidden in the parallel bands of `plot.py`, shows there; for each sensor it prints the level, the own noise (median of the differences between two measurements) and the min/max deviation per step with their instant, in units and in noises; `--residuals no`: none of these PNGs nor these tables. With `--others`, more **residuals-…-others** PNGs: each sensor minus its own median **and minus the median of the other sensors at the same instant** (what all share, the remainder of the compensation of a common movement, cancels; what is specific remains), and, per sensor, the slope and the correlation r of this residual on the common median of `x`, `y`, `sigma0`: a dip that remains after `--others` is not a remainder shared by all; a high slope with r close to ±1 on common `y` says it is proportional to the common movement (gain specific to the sensor), without r or slope it is independent of the movement. With `--rigid BASE`, one more **rigid** PNG: at each measurement, the overall movement of the targets since the instant `BASE` (translation, rotation, scale, estimated by medians: a target that jumps alone does not pull it; `--without A,B` removes targets from it), and, for each sensor, the **residual** `dx`, `dy` (raw position minus its position at `BASE` carried by this movement, in px); panels: `dx`, `dy` of each global reference against the median and the 10th-90th percentile of the targets, `|residual|` of the targets (median, 90th percentile), fitted rotation and scale, `reproj_err` of the references; it prints the table by step (`rot_deg`, `scale`, `tx`, `ty`, `tgt_med`, `tgt_max`, `dx`, `dy` of each reference, and of each sensor of `--follow A,B`: the step-by-step sequence of a target) and, per sensor, min, max and value at the last instant of `dx`, `dy`. Rejected measurements enter neither the fit, nor the band of the targets, `tgt_med`, `tgt_max`, nor the columns of the table: over several days, parked cars or night rejections no longer drown the rest; on the PNG, a rejected refer
| `python3 tools/scripts/ranges.py <folder> [--columns error_value,corr_x,corr_y] [--k 5] [--merge 1h] [--min-measurements 1] [--outside T1/T2] [--rolling N\|DURATION] [--instants N] [--sensors A,B] [--start T] [--end T]` | By column and by sensor, at the measurements (native step, never averaged): level (median of the window), own noise, **largest jump** from one measurement to the next (value, in noises, the two instants); then the **ranges** where the sensor deviates from its level by more than `--k` noises: start, end, number of measurements, extreme (signed, in units and in noises) and its instant; two ranges of the same sign less than `--merge` apart make only one, rejected measurements do not cut a range; column `rejected`: how many of the range's measurements are (and `rejected extreme`), `(rejected: …)` after a largest jump of which one end is. Used to date the start and the end of a sensor's moment without rerunning ten tables. A noise of `0` (and "-" in noises, no range): the values are constant to rounding (deviations below 1e-9), like the `corr` of the references when the compensation retains only two (see Conventions); the same in `overview.py --residuals` and `days.py`. When a long episode skews the window median (the sensor spends half the batch there), `--outside T1/T2` computes level and noise outside the episode; a range that touches the edge of the window is dated at the edge. `--min-measurements N` prints only the ranges of at least N measurements (and says how many out of the total): over a batch of several days, the one-step ranges number in the hundreds and drown the long steps; first read with `--min-measurements 6`, then without. `--rolling N` (N measurements on each side) or `--rolling 1d` (the measurements within a duration): the level of each measurement is the median of its neighbours, without it; a long drift or a step follows this local level, only the deviations shorter than the window remain (the level column of the table and the noise do not change; with `--outside`, only the noise is computed outside the episode). `--instants N`: at the end, the instants where at least N sensors are out of level on one of the columns, with each sensor and its signed deviation in noises (`cx` corr_x, `cy` corr_y, `ev` error_value), the sensors rejected at that instant (among `--sensors`: removing the always-rejected sensors lightens the list), and each reference: `error_value` (`r` if rejected) / inlier |
| `.venv/bin/python tools/scripts/days.py <folder> [--columns corr_x,corr_y,error_value] [--night 20-3] [--k 5] [--days 2] [--step 15min] [--sensors A,B] [--bounds [--smoothing N] [--fraction F]] [--start T] [--end T] [--out D]` | What comes back from one day to the next, on accepted measurements only. 1. **Level of each night** (hours `--night` H1-H2 UTC, straddling midnight, dated from the day it starts), by sensor and by column: median, MAD, number of measurements, and the own noise; then, from one night to the next, the **step** (difference of the medians, in units and in noises) and **where it falls** ("between A and B": where the sequence of night measurements of the two nights splits best between the two levels; B at the start of the following night: the cut falls by day, between the two nights). A step of a few noises, a drift from one night to the next, and two columns that step at the same instant read there, even when the sensor has several levels in the batch. 2. **Superimposed days**: PNG **byhour-<column>**, a small chart per sensor, hour of the day on the x axis, one curve per day, each measurement minus the level of the last night started (night greyed, frame from the 1st to the 99th percentile, the title says how many measurements fall outside the frame); table: per `--step` slot of the hour of the day, the sensors whose deviation exceeds `--k` noises, on the same side, at least `--days` days, with the number of days and the median of these deviations. What comes back every day at the same hour, on one sensor or several, groups there, even when it lasts only one to three measurements. 3. **Bounds of each day**, with `--bounds`: for the median of the targets of each column and for the camera pose (`pan`, `tilt`, `rotation`, `scale`, `sigma0`, if `camera/` exists), the deviation from the level of the night that precedes each day (a day goes from the end of one night to the end of the next; with `--sensors`, the median of these sensors, with a single one, its own). Per day: number of measurements, the first and the last; first and last instant beyond `--k` noises, with the measurement just before and just after, at the native step; signed max and min with their instant; the sequence of measurements beyond `--k` noises that surrounds the larger of the two; the following night minus the reference night. A day without measurement says so; a reference night that is not the previous one is named. Each day line starts with the short name of its series (`corr_x`, `pose_tilt`…): over a month, `\| grep '^pose_tilt '` reads one, `\| grep ' 12/10 '` one day. `--smoothing N`: the deviation of each measurement is the median of the N measurements of the day centred on it (noise and `--k` unchanged; PNG: smoothed in blue, raw in grey): an isolated point no longer cuts the sequence around the extreme and no longer makes a first or a last exceedance. `--fraction F`: the threshold of each day is F times the largest |deviation| of that day (printed on its line, `threshold …`), instead of `--k` noises: when the noise at the native step is unrelated to the amplitude of the cycle (very noisy or very smooth pose). PNG **bounds**: the deviation over the batch, first → last exceedance light grey, sequence around the extreme dark grey, max and min marked. The choice of `--night`: hours where the day cycle (`error_value`, camera pose) has subsided. **Look at the PNGs with Read** |
| `.venv/bin/python tools/scripts/metrics.py <folder> [--names A,B] [--step 1h] [--stat median\|min\|max] [--against temperature] [--smoothing 24h] [--metrics-only] [--start T] [--end T] [--out D]` | The system metrics of `metrics/` (one value per hour), never the identifiers (`SIM_CCID`, `ip*`). Prints the available metrics with their number of values over the window ("empty": none), then a table per `--step`: `temperature` (median of the `sensor_*_deg_c` components, the one the detectors read), each metric of `--names` (default: the `*_deg_c` and `BusVoltage`), then, unless `--metrics-only`, `tgt_corr_x`, `tgt_corr_y` (median over the targets of `corr` minus each target's own level, accepted measurements) and the raw camera pose (`cam_pan` … `cam_sigma0`); an empty cell is skipped, a text metric (`link`, `BatteryState`, `last_sync`) is returned as it is. Then, per column: filled steps, min and max with their instant; the correlation r and the slope of each column on `--against` (with `--smoothing 24h`, on its rolling mean, column `<against>_smooth`); the dated runs of steps without any metric. A PNG: temperatures on one panel (median in black), each other metric on its own, then `tgt_corr_x`, `tgt_corr_y` and the pose, line cut on a gap. **Look at it with Read** |
| `.venv/bin/python tools/scripts/stations.py <folder> <folder> [...] [--columns temperature,cam_tilt,cam_rotation,cam_scale,tgt_corr_x,tgt_corr_y] [--step 1h] [--stat median\|min\|max] [--table T1/T2\|no] [--start T] [--end T] [--out D]` | **Several stations on the same timeline** (neighbouring stations, same building). Possible columns: `temperature` (as in `metrics.py`), `cam_pan` … `cam_sigma0` (raw pose), `tgt_corr_x`, `tgt_corr_y` (as in `metrics.py`), `rej_targets`, `rej_refs` (number of rejected targets, of rejected references, the largest of the step). Prints per station the period, the cadence and the number of instants; then the **gaps**: the runs of steps without measurement or without temperature, with the stations where they are missing (a gap common to several stations on a single line); then the table by step (one `STATION:column` column each, tabs; `--table` as in `overview.py`); then, per column and per pair of stations, r of the values and r of the steps from one value to the next (a common movement shows on the steps, a common trend on the values), with n. PNG **stations**: a panel per column, a line per station (raw temperature, the rest minus its median), and a band per station of the steps without measurement. Take `--step` equal to the slowest cadence of the stations; over a month at `1h`, first read with `--table no`. **Look at it with Read** |
| `python3 tools/scripts/quality.py <folder> [--calm T1/T2,T3/T4] [--common] [--table M] [--step 15min] [--threshold 0.5] [--sensors A,B] [--start T] [--end T]` ; `... --labels F [--numbers 3,7] [--margin 60] [--edges]` ; `... --labels F --outside [--min 1] [--except "Thermal displacement"]` ; `.venv/bin/python tools/scripts/quality.py <folder> --figure [--metrics flux,snr,dominance] [--labels F] [--zone T1/T2 ...] [--out D]` ; `python3 tools/scripts/quality.py --self-test` | The six **image quality metrics** (`peak`, `flux`, `sharpness`, `fwhm`, `dominance`, `snr`; definitions: `labeling/knowledge/quality-metrics.md`), on the stations that have them (otherwise: "No quality metrics", and nothing else). Each measurement becomes a **ratio** to the **calm reference** of its sensor: the median of the metric over its measurements in the `--calm` windows, at the same UTC hour of the day (without `--calm`: the whole folder); 1 = like the reference, < 1 lower, > 1 higher; for `fwhm` and `dominance`, it is the rise that says a degraded image; rejected measurements included. Without options: the folder's maximal `peak`, then per sensor (`r` = reference) the rejected measurements, `pk/max` (median peak over the window divided by this maximum: at 1, the spot touches the image ceiling, its `peak` no longer moves and its `sharpness` follows the exposure: read `flux`, `snr` instead), and for each metric the median ratio and the extreme with its instant; then the median of the targets and of the references. `--common`: per step, the median of the ratios of the targets / of the references for each metric (what affects the whole scene, visibility or turbulence; `--step 1d` to see on one screen on which days the reference holds). `--table M`: per step, the ratio of `M` of each sensor (`*`: a rejected measurement), their median and how many pass `--threshold` (below, or above 1/`--threshold` for `fwhm`, `dominance`): a target that goes out and comes back. `--labels F` (one JSON per line, `start`, `end`, `family`): per numbered label, the median ratio of the targets and of the references over the hour before, the range and the hour after (`tgt 0.96\|0.26\|0.79`, `--margin` minutes), then the sensors **affected** over the range (flux or snr below `--threshold`, or dominance above 1/`--threshold`), with their worst flux, from lowest to highest; `--edges`: per instant of the widened range, the number of affected sensors and the median of the targets of flux, snr, dominance (`<` within the range), to date the first and the last degraded instant. `--outside`: the runs of instants that no label covers (outside `--except` families) where at least `--min` sensors are affected, with the sensors and their worst flux: candidates for forgotten labels, to check on `corr_x`, `corr_y`. `--figure` (instead of the tables): PNG **quality-common** (a panel per metric, log scale: median of the targets in black, of the references in red, grey band from the 10th to the 90th percentile of the targets: a disturbance of the whole scene moves the median, an occultation of a few targets moves only the bottom of the band) and a PNG **quality-<metric>** per `--metrics` (a small chart per sensor, references in red); `--labels` greys each label there in one colour per family, `--zone` ranges. **Look at the PNGs with Read** |
| `.venv/bin/python tools/scripts/thumbnails.py <folder> --sensors A,B --times T1,T2 [--radius 100] [--contrast [MIN,MAX]] [--fixed] [--zone X,Y,W,H] [--out D]` | A sheet of full-resolution thumbnails: one row per sensor, one column per time, centred on the sensor's raw position (`x`, `y`) at each time (the centre of the frame is written under each thumbnail: when `x`, `y` jump, the frame moves by as much, and a spot that enters the frame seems to appear); `--fixed` keeps for each sensor the frame of the first time and marks with a red cross the `x`, `y` of each time; unretouched pixels, the brightness can be compared from one thumbnail to the next; prints for each thumbnail the background (median), the 99th percentile and the peak (grey levels 0 to 255); without an image at the requested time, takes the nearest and prints the gap (the actual time is in the title). A faint or deformed spot is invisible as it is: `--contrast MIN,MAX` puts all the thumbnails in grey with the same stretch (without value: from the 1st percentile to the sheet's maximum, crushed by a saturated pixel; then choose MIN,MAX from the printed background and peak, e.g. `10,40`), `--radius 30` to `50` magnifies; compare the shape and the peak before, during and after an episode, at the same hour of the day. **Look at it with Read**: a whole image read by Read is reduced, a small reflector becomes illegible in it. A frame that the image edge cuts is flagged ("frame cut by the image edge (W × H px)"): on some stations, `x`, `y` are not pixels (values close to 0) and the frame falls in the corner; then look at the scene through `--zone`. `--zone X,Y,W,H` (pixels of the original image: top left corner, width, height, as in `gif.py`): the same zone at each time, side by side (up to 4 per row), same stretch with `--contrast`; `--sensors` becomes optional, and those that are given are marked with a cross and their name. For the scene around the targets (foreground object, headlights, lighting), prefer it to a large `--radius`. Each thumbnail is rendered pixel for pixel up to 1000 px a side, but Read reduces a wide PNG: with a large `--radius` or a large `--zone`, three or four times per sheet |
| `.venv/bin/python tools/scripts/gif.py <folder> --start T --end T [--width 720] [--duration 700] [--max 150] [--zone X,Y,W,H] [--out D]` | A GIF of the camera images between `--start` and `--end` inclusive, cropped to `--zone` if needed, set to `--width` px, UTC date and time written at the bottom right; beyond `--max` images, `--max` at regular intervals; prints the time of each image, then the path and the size of the GIF. Used to attach the scene to a reply to the customer; Read does not read a GIF: to look, `thumbnails.py --zone` |
| `ls <folder>/images/ \| grep <YYYYMMDD>T<HHMM>Z`, then Read on the file found (Read takes no pattern) | The whole camera image at that time (UTC), for the scene (occultation, lighting, weather) |
`--out <folder>`: where whoever calls you stores your figures; they give it to you.
## Conventions
- Instants: `2026-01-01T00:00Z`; a time without time zone is read as UTC; `--end` includes the minute given. On a batch, `--start` and `--end` of the batch.
- Bash is used only to run these tools, `ls`, `grep` and `date`, one command per call, without a `for` loop (a pipe to `grep` is allowed): permissions are granted command by command. If the current directory is not the root of the calling repository, `cd <root> && <command>` counts as one command. Write no other script. Whoever calls you may add commands to this list.
- **An output too long for one call** (beyond a few hundred lines, cut at display): shorten it first with the tool's options (`--table no` then `--table T1/T2`, `--min-measurements`, `--sensors`, `--columns`, a shorter window), or read a section of it through a pipe to `grep` (`| grep -A40 '^Title'`, `| grep '^pose_tilt '`). If you have to reread it several times, store it in the output folder in the same call (`<command> > <out>/<name>.txt`) and read that file with Read (`offset`, `limit`) or with `grep`: no `head`, `tail`, `sed`, `cut`. The tools create their output folder themselves: no `mkdir`.
- A sensor name that carries an apostrophe (`COLH20'''`, `REFP''21`) goes in double quotes in the shell: `--sensors "COLH20'''",COLI22`.
- Each PNG is looked at with Read: a PNG you have not looked at has shown nothing.
- **Image quality metrics** (`quality.py`): they say **why** a measurement degrades, where `error_value` says only that it degrades; they prove a cause and name the affected targets. What they showed on LENZSPITZE (to be confirmed on each station): `flux` cut (close to 0) on a group of targets, the others intact, for one to a few measurements: these targets are hidden (the list is read on the flux each time, not on the usual list; a hidden target can stay under its error threshold, and its point is wrong); `flux` down over the whole scene, stronger on the distant targets: reduced visibility; `sharpness` down and `dominance` up, `flux` whole: the image shakes (turbulence); nothing moves: neither the image nor the view, to be looked for in the movement. A whole flux refutes an occultation. `fwhm`, truncated to the disc, moves little; on a spot at the ceiling (`pk/max` at 1), it goes down when the spot darkens. **The calm reference decides everything**: take `--calm` on calm hours of the **same image regime** as the range read. When the lighting or the exposure changes (after a gap, an intervention), a reference on the other side skews the ratios by a factor of two or three: `--common --step 1d` over the batch shows this change (medians of the targets and of the references far from 1 for whole days, then at 1); then take a reference on each side and read each side with its own. Calm days are often days of thermal cycle: a reading of the thermal against them is circular.
- A rejected measurement (`error_value` above the threshold) is not a measurement: the station empties the `corr` of a rejected target, but leaves those of a rejected **reference**, often absurd; the tools empty them (`corr`, ranges, residuals, jumps cover only accepted measurements). When the compensation retains only **two references**, their `corr` is 0 (to 1e-13): it passes exactly through them; their noise prints as `0` and their deviations in noises as "-"; read nothing into these values, read the references through `x`, `y` (`overview.py --rigid`) and `error_value`. Its `x`, `y` remain: before citing a jump of `x`, `y`, check whether it is marked `(rejected)`; a rejected measurement is not cited as a movement.
## The method
1. **Inventory**: what is available, what is missing (files, what each source contains, images, camera poses, period, cadence, sensors). A filled column that the tools do not show or a source that no tool reads (`images_diff/`) remains data: know that it exists. The six image quality columns (`peak` to `snr`), filled on recent cameras, are read through `quality.py`. `metrics/` is read through `metrics.py`: a cut of the measurements is read against the steps without metric and the voltage (`--names BusVoltage,BusCurrent,Power,BatteryPercent --metrics-only` on the cut); metrics that are all empty ("empty" on each name) are an absent datum, not a stable temperature. On a batch, rerun it with the batch's `--start`/`--end`: the absent steps and the rejections of the batch, dated; those of the whole period say nothing about the batch. Read the rejections of the **references** as much as those of the targets: a sensor rejected at the same hours every day makes a moment on its own (say its share of rejected measurements and its hours, day by day); when it is a reference, say with how many references the compensation then runs (the list of retained references). When several targets jump together by one step, or the compensation drops (no pose), look first in that list at which references were lost at that instant.
2. **Wide first**: `overview.py` on the batch, first (on a batch of more than a few days, with `--table no`, then `--table T1/T2` on the days to read); **the camera pose first** (top panels, `cam_` columns of the table): when the camera rotates (`pan`, `tilt`, `rotation`), changes scale (`scale`), when its registration degrades (`sigma0`) and when it is not registered (line cut, instants without pose), dated at the native step; each moment of the sensors is then read against it: during a movement or a registration gap, or camera still. The pose is computed from the global references: a change of pose (or a rise of `sigma0`) reads as a camera movement only if **the targets also move in the image**; look, on the `x`, `y` panels, at the lines of the references against the black line of the targets alone (and the `x_targets`, `y_targets` column of the table). If only references move in the image and the targets stay still, it is these references that moved: the pose and the `corr` of all the targets are skewed by it, without raw movement of the targets; say which references and by how much. If everything moves together, references and targets, it is the camera or the scene; then look whether the `corr` come back. As soon as the pose rotates or changes scale, the deviation from the median no longer says who moves alone (each sensor deviates from it according to its place in the image): before writing "everything moves together", rerun with `--rigid BASE`, `BASE` a calm instant before the first movement, and read the **rigid** PNG and its table: a reference whose residual stays far from the 10th-90th percentile of the targets, or a `reproj_err` of the references that does not come back, means that the compensation remains skewed by these references and that the steps of `corr` partly come from it; say which ones, by how much, until when; a `|residual|` of the targets that rises says they do not move as a block. Then the median of `x`, `y` (raw position, references included), the references one by one, the targets alone and `sigma0` say what moves in the image, before reading `corr`; read the printed table (time, value) to date the start, the end and the return of the movement and to see a level that does not come back, and do not guess them on the PNG axis: a dip of `corr` that follows a movement of the raw median is the remainder of the compensation, not a movement of the affected sensors themselves; the small multiples of `error_value` show a lasting step of a sensor, the count shows the instants where many sensors rise together. On every batch, without waiting for a suspicion, look at the **residuals** PNGs (`corr_x`, `corr_y`, `error_value`): each sensor against its own level, that is where a single sensor that rises or falls, a `corr` that drifts by a few hundredths, a step specific to one sensor under a common movement are seen; the table says by how much (in noises) and when. To separate, on a target whose `corr` goes down under a strong common movement, a remainder of the compensation from a movement of its own, rerun with `--others` (the shared remainder disappears, the slope on common `x`, `y` says whether it is proportional). On a batch of more than two days, then run `days.py` (before reading the isolated steps of `ranges.py`): what comes back every day at the same hour is read first on its **byhour** PNGs and its table by slot, and makes one moment per hour of the day (say which sensors, how many days out of how many, the amplitude, what the camera pose does at that hour), not one moment per day nor nothing at all because each step is short; then read its **night levels** table, for any sensor that has already made a step or for which `--outside` is not enough (several levels in the batch): each step from one night to the next is dated by its "between A and B", and a step of `error_value` and one of `corr` at the same instant are linked; a slow drift reads from one night to the next. For what comes back every day and is labelled day by day (thermal cycle, warming and cooling), rerun `days.py --bounds` rather than
3. **Then zoom**: `summary.py` at 15min (`--stat max` for the real peak of a sensor), and `plot.py` on the windows and the sensors that move.
4. **Each sensor against its own usual level** (its median and its MAD), never against an absolute threshold; on a batch, the level is computed on the batch (`--level window`, `overview.py`), not on the whole period.
5. **Each retained moment is dated and measured at the native 15 min step**: start, end and maximum read on the 15 min table (`overview.py` by default, `summary.py --step 15min`), never on an hourly table; also read `overview.py --min 1` for single sensors, and `ranges.py` on the batch (first with `--min-measurements 6`) to get, per sensor, start, end, extreme and largest jump at the native step (rerun it with `--outside` around a long episode to date its return to the level, do not conclude "does not come back" without having read it; when the batch has a long drift or several steps (the ranges number in the hundreds, or one half of the batch is "out of level"), rerun it with `--rolling` (a few measurements, or a duration of a few hours to a day depending on the cadence) and `--instants 2`: the brief deviations under the drift come out alone, and the list per instant says which sensors deviate together, which are rejected and what the references do at that instant; a deviation of all the targets with the references at the same instant is read against the camera pose), and the tables of `x`, `y` on the windows where they stir. On a station that has the quality metrics, for each moment: `quality.py --table flux --sensors …` (or `--labels F --numbers N --edges` on a label) says which targets are hidden (flux cut) or veiled, from which instant to which instant; write them by their name.
6. **The images**: thumbnails (with `--contrast` for a faint target) spaced, one every 2 to 3 h, tighter where the curves move, always with an unaffected witness sensor, at a time before, during and after (at the same hour of the day if possible); when `x`, `y` of a sensor jump between two thumbnails (centre of the frame written under each), rerun with `--fixed` before saying that a spot appears or disappears; the whole image for the scene (occultation, lighting, weather).
## What the reading returns
One line per moment. A moment: a sensor or a group of sensors that leaves its usual level during a window you can date.
| Start | End | Sensors | Columns | What I see | Images |
|---|---|---|---|---|---|
- **Sensors**: references or targets, how many, which ones.
- **What I see**: the shape (one-step peak, step, slow rise, agitation), the amplitude against the usual level (in MAD or in times the median), the return to normal or not, what the other sensors do, **what the camera does** at the same moment (pose moving, by how much, or still; registration absent; "no `camera/`" if the folder has none).
- **Images**: what the thumbnails and the whole image show at that moment, or "no image".
Times in UTC.