Repository navigation
Commit cdbce61
TPC: fix the chain-rule grid factors in addCorrections
A correction added on a different spline grid is sampled at the main grid's knots, and its derivatives must be converted with the
chain rule: with u = (y - y0) * yScale, d/du_main = (yScale_corr / yScale_main) d/du_corr, the same for v. addCorrections used the
inverse ratios, and applied the u factor to the dS/dv parameter and the v factor to dS/du (knot parameters {S, dS/dv, dS/du,
d2S/dudv}).
For identical grids (e.g. the derivative map) the factors are 1 and nothing changes. The M-shape map is created on a 4 x 4 grid in
TPCScalerSpec, with factors of 35-98 with respect to a production map: adding the M-shape map of run 544797 (up to 6 mm) to a map of
run 568041 gave errors of up to 89 cm in dx and up to the kMaxCorrection limit of 100 cm in dy (rms 4 cm and 7 cm), vs the
point-by-point sum. With the fix: rms 1-2 um, max 60 um (resampling of non-nested grids) inside the main map's grid. Outside of it
(|z| > ~1.37 x for production voxel maps) the merged map follows the edge and z fade-out of the main grid, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent f390389 commit cdbce61
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
| |||
1117 | 1118 | | |
1118 | 1119 | | |
1119 | 1120 | | |
1120 | | - | |
| 1121 | + | |
| 1122 | + | |
1121 | 1123 | | |
1122 | 1124 | | |
1123 | 1125 | | |
| |||
1133 | 1135 | | |
1134 | 1136 | | |
1135 | 1137 | | |
1136 | | - | |
| 1138 | + | |
1137 | 1139 | | |
1138 | 1140 | | |
1139 | 1141 | | |
| |||
0 commit comments