Add object calibration

This commit is contained in:
Ayzen
2026-10-05 17:39:40 +03:00
parent 8f097dfa2e
commit 552cdc688a
33 changed files with 3141 additions and 517 deletions
+19 -2
View File
@@ -21,7 +21,8 @@ simply skips to the freshest frame:
configures the radar, performs the frequency sweep, and publishes raw S11/S21
traces.
2. **Preprocessing** — `data_preprocessor` applies through/OSL calibration,
reference subtraction, and optional frequency-domain notch filtering.
reference subtraction, optional frequency-domain notch filtering, and an
optional object-based MIMO correction of S21.
3. **Processing** — `data_processor` runs the selected processing mode and emits
results (pass-through traces, B-scan images, GPR images with detected objects,
or 3D SAR views). Detected objects are additionally broadcast to subscribers
@@ -223,13 +224,29 @@ result count or Stop; Stop and closing the window flush accepted data. Acquisiti
rings use latest-wins delivery, so disk recording cannot recover sweeps overwritten
before the GUI receives them. NumPy datasets preserve both S-parameters, capture
windows, every supported result payload, and processing time. Failed exports remove
their staging files, leaving existing datasets intact.
their staging files, leaving existing datasets intact. Companion profiles retain
the radar, antenna layout and preprocessing used for acquisition, including when
another profile is loaded after Stop.
Calibration and reference sets keep their trace arrays and metadata together in one
atomically replaced NPZ archive, with a readable JSON sidecar. Earlier NPZ/JSON pairs
remain supported. Invalid trace shapes, duplicate combinations and non-finite
calibration/reference values are rejected before a saved set is replaced.
Median captures also require identical frequency axes and channel coverage.
In **Preprocessing Panel**, create or select the ordinary S21 calibration and
empty-scene reference first. **Create…** in the **Object Calibration** row opens a separate step:
take fresh sweeps, then enter the measured reflector centre X/Y/Z in metres.
Height above ground, radar pitch and sphere radius follow `mimo_calibration.py`;
several reflector positions may contribute to one calibration. The calculation
shows each pair's phase at the target before/after correction and its coherence.
The selected reference is already subtracted, and the previous object correction
is disabled while these sweeps are acquired. Saved object corrections apply on the
next **Start**, after notch filtering and before any processor; **Off** disables
them. Changing antenna geometry disables an incompatible correction and reloads
acquisition without restarting the application. **Import…** in that row
accepts the example's `cal_*.npy` / `cal_meta.json` format; the example and GUI share
one numerical implementation.
Dataset replay restores both recorded S-parameters and orders long recordings by
their numeric index; older S21-only datasets still replay with zero S11. Offline
JSON conversion and the GUI share the same sweep-matching code.