# PHerc0500P2: 20250526151718-2.215um-0.4m-111keV-masked -> 20250528085330-4.317um-1.2m-111keV-masked

Registration of the moving scan `20250526151718-2.215um-0.4m-111keV-masked` (2.215 um) to the fixed scan `20250528085330-4.317um-1.2m-111keV-masked` (4.317 um), made with `ufsm reg` (github.com/SuperOptimizer/ufsm, src/reg.c), CT read from this mirror.

- `transform.json`: published schema; `transformation_matrix` = refined best-fit affine, moving level-0 voxel (x, y, z) -> fixed level-0 voxel (x, y, z).
- `field.f32` + `field.json`: residual smooth displacement on the fixed grid; full map: moving = T^-1 (p + D(p)) for a fixed point p (see field.json, worked example).
- `reg.json`: the same map in ufsm's format (`ufsm reg map reg.json [--f2c] x,y,z`, `ufsm reg overlay`, `ufsm reg boxes`).
- `eval.json`, `eval_boxes.jsonl`: accuracy before / after on held-out boxes and the certified region; `residuals.jsonl`: the final fit's per-box residuals.

Method: starting from the published transform, per ~1.2 mm box the moving scan's pyramid level closest to the fixed voxel is resampled onto the fixed grid,
both are band-passed (difference of Gaussians), and the 3D shift maximising normalised cross-correlation is found (integer search, then sub-voxel by re-resampling and a quadratic fit).
A Huber-robust affine correction and a membrane-regularised trilinear displacement field (spacing 0.8979360000000001 mm, chosen by 1/5 hold-out cross-validation) are fitted to the box shifts,
coarse to fine (~19 um, ~9.5 um, ~4.8 um boxes). Evaluation boxes sit midway between the fit boxes.

| | p50 | p90 | share < 1/4 voxel |
|---|---|---|---|
| before (published transform) | 4.112 vox (17.75 um) | 8.179 vox (35.31 um) | 0% |
| after (held-out boxes) | 0.187 vox (0.81 um) | 0.38 vox (1.64 um) | 69.3% |

Voxels are fixed-scan level-0 voxels (4.317 um). Certified: 169 of 244 papyrus evaluation boxes (per fixed-z slab in eval.json).
