Commit 41930c37 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: lean debug render = TRUE weighted average (before the sum scaling)

Per Andrey's input-verification methodology: the -POSE-RT-COMPOSITE "real"
component must be the weighted 16-sensor average (comparable to the virtual
render), while the correlator receives the per-tile SUM (379b3cf6 fix).
Render moved BEFORE the sum scaling (extra H2D + imclt in debug mode only);
the post-correlation render (which would now show the count-stepped sum)
removed.

Verified: mvn -DskipTests clean package OK.
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 379b3cf6
......@@ -323,6 +323,13 @@ public class CuasPoseRT {
final float [][] fclt16 = gpuQuad.getCltData(false);
final int [] td_counts = new int [fclt16[0].length / CuasTD.TD_CHUNK];
final float [] avg_td = CuasTD.consolidateSensorsTD(fclt16, td_counts);
// DEBUG (img_out): render the TRUE weighted average - the input-verification image
// (comparable to the virtual render) - BEFORE the sum scaling below. Costs one extra
// H2D + imclt, debug mode only. By Claude on 07/04/2026.
if (img_out != null) {
gpuQuad.setCltData(0, avg_td, false);
img_out[0] = com.elphel.imagej.cuas.CuasMotion.perSensorImagesFromTD(gpuQuad, false)[0];
}
// Scale the average back to the per-tile SUM of sensors - the oracle inter-corr
// operating point (it sums the pair products unweighted, and the FZ-normalize
// applies the same absolute fat zero). The 1/16 amplitude of the plain average
......@@ -357,12 +364,7 @@ public class CuasPoseRT {
return null;
}
if (corr_pd_out != null) corr_pd_out[0] = corr_pd; // debug rendering (-POSE-RT-CORR2D) // By Claude on 07/04/2026
// DEBUG (img_out): render the composite actually correlated - sensor slot 0 holds the
// consolidated TD average (setCltData above); correlation did not modify the CLT buffer.
// By Claude on 07/04/2026.
if (img_out != null) {
img_out[0] = com.elphel.imagej.cuas.CuasMotion.perSensorImagesFromTD(gpuQuad, false)[0];
}
// (img_out is rendered in step 3, BEFORE the sum scaling - the true weighted average) // By Claude on 07/04/2026
// 6. peak + eigen per tile (the GPU argmax+eigen kernel's Java oracle)
final int corr_width = 2 * GPUTileProcessorDttSize() - 1;
final double [][] centers = new double [num_pix][];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment