Commit 29c7239b authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: CuasRender - dedicated CUAS RT renderer + MINIMAL ingest+render certification test

Per Andrey (2026-07-05): today's problems came from jumping over the standalone
certification of conditionSceneToGpu (single caller inside the pose test, never
image-tested by itself). Test and debug the ingest+render chain FIRST, only then
return to the pose test.

NEW class cuas/rt/CuasRender (the start of the dedicated renderer per the spec
in imagej-elphel-internal handoffs/2026-07-05_cuas_rt_dataflow_and_grids.md par.6:
virtual uniform grid always, raw center DSI disparity, jp4+CuasConditioning
pixels, QuadCLT borrow-only, static methods):
- renderSceneVirtual(): tasks at pose (ALL valid-disparity tiles) -> convert
  (erase=1, NaN outside tasks) -> 16 per-sensor renders + consolidated (NaN-aware
  weighted average) merged render. No correlation.
- testRenderSequence(): per scene raw /jp4/ -> conditionSceneToGpu -> render at
  BORROWED stored pose + stored ERS rates (the exact sources the oracle DBG
  renders use) -> saves <center>-CUAS-RT-RENDER.tiff hyperstack
  [t: s00..s15, merged][z: scenes], slice-by-slice comparable to
  -CUAS-INDIVIDUAL-CUAS-DBG / -CUAS-MERGED-CUAS-DBG.

New checkbox "CUAS RT render test (ingest+render)" (curt.rend_test), takes
precedence over the pose test in the curt_en branch.

Verified: mvn -DskipTests clean package OK.
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 6eaa8bf4
This diff is collapsed.
......@@ -28,6 +28,7 @@ public class CuasRtParameters {
public boolean pose_corr_save = false; // DEBUG: save the per-scene 2D correlations vs the virtual center in the pixel domain (-POSE-RT-CORR2D: z=scenes, tile grid of 16x16 cells, last LMA cycle) - lean engine only. // By Claude on 07/04/2026
public boolean pose_img_save = false; // DEBUG: save the composite scenes actually correlated - imclt render of the consolidated 16-sensor TD average at the converged pose (-POSE-RT-COMPOSITE: z=scenes; NaN outside task tiles) + the virtual-center reference render (-POSE-RT-CENTER-REF). Lean engine only. // By Claude on 07/04/2026
public boolean pose_stored = false; // DEBUG: decouple rendering/measurement from the LMA - use the STORED (oracle vintage) pose for every scene, no adjustment; one leanMeasure per scene feeds -POSE-RT-HYPER/-CORR2D/-COMPOSITE. The composite must then match the oracle CUAS-MERGED-CUAS-DBG renders tile-for-tile. Lean engine only. // By Claude on 07/04/2026
public boolean rend_test = false; // MINIMAL RT ingest+render test (CuasRender.testRenderSequence, takes precedence over pose test): per scene raw /jp4/ -> conditionSceneToGpu -> virtual-grid render at BORROWED stored pose+ERS rates -> -CUAS-RT-RENDER hyperstack [s00..s15, merged][scenes], comparable to -CUAS-INDIVIDUAL/MERGED-CUAS-DBG. Certify THIS before the pose test. // By Claude on 07/05/2026
public double psf_radius = 1.0; // sensor PSF radius for LoG pre-filter
public double n_sigma = 4.0; // cutoff LoG kernel array, number of sigmas
public int pyramid = 7; // temporal pyramid levels
......@@ -109,6 +110,8 @@ public class CuasRtParameters {
"DEBUG: save the rendered composite (TD-averaged, grid-transformed) scenes correlated against the virtual center (-POSE-RT-COMPOSITE, z=scenes) + the center reference render (-POSE-RT-CENTER-REF). Lean engine only.");
gd.addCheckbox ("Pose test stored poses (no LMA)", this.pose_stored, // By Claude on 07/04/2026
"DEBUG: measure/render every scene at its STORED pose, skip the LMA entirely - decouples the task/render/correlation chain from the solver. Lean engine only.");
gd.addCheckbox ("CUAS RT render test (ingest+render)", this.rend_test, // By Claude on 07/05/2026
"MINIMAL standalone test (precedence over pose test): raw jp4 -> conditioning -> virtual-grid render at borrowed stored poses/ERS; saves -CUAS-RT-RENDER [s00..s15+merged][scenes] to compare against the -CUAS-*-DBG oracle products.");
gd.addMessage("=== LoG prefilter ===");
gd.addNumericField("Optical PSF radius", this.psf_radius, 6,8,"pix",
......@@ -244,6 +247,7 @@ public class CuasRtParameters {
this.pose_corr_save = gd.getNextBoolean(); // By Claude on 07/04/2026
this.pose_img_save = gd.getNextBoolean(); // By Claude on 07/04/2026
this.pose_stored = gd.getNextBoolean(); // By Claude on 07/04/2026
this.rend_test = gd.getNextBoolean(); // By Claude on 07/05/2026
this.psf_radius = gd.getNextNumber();
this.n_sigma = gd.getNextNumber();
......@@ -323,6 +327,7 @@ public class CuasRtParameters {
properties.setProperty(prefix+"pose_corr_save", this.pose_corr_save+""); // boolean // By Claude on 07/04/2026
properties.setProperty(prefix+"pose_img_save", this.pose_img_save+""); // boolean // By Claude on 07/04/2026
properties.setProperty(prefix+"pose_stored", this.pose_stored+""); // boolean // By Claude on 07/04/2026
properties.setProperty(prefix+"rend_test", this.rend_test+""); // boolean // By Claude on 07/05/2026
properties.setProperty(prefix+"psf_radius", this.psf_radius+""); // double
properties.setProperty(prefix+"n_sigma", this.n_sigma+""); // double
......@@ -402,6 +407,7 @@ public class CuasRtParameters {
if (properties.getProperty(prefix+"pose_corr_save")!=null) this.pose_corr_save=Boolean.parseBoolean(properties.getProperty(prefix+"pose_corr_save")); // By Claude on 07/04/2026
if (properties.getProperty(prefix+"pose_img_save")!=null) this.pose_img_save=Boolean.parseBoolean(properties.getProperty(prefix+"pose_img_save")); // By Claude on 07/04/2026
if (properties.getProperty(prefix+"pose_stored")!=null) this.pose_stored=Boolean.parseBoolean(properties.getProperty(prefix+"pose_stored")); // By Claude on 07/04/2026
if (properties.getProperty(prefix+"rend_test")!=null) this.rend_test=Boolean.parseBoolean(properties.getProperty(prefix+"rend_test")); // By Claude on 07/05/2026
if (properties.getProperty(prefix+"psf_radius")!=null) this.psf_radius=Double.parseDouble(properties.getProperty(prefix+"psf_radius"));
if (properties.getProperty(prefix+"n_sigma")!=null) this.n_sigma=Double.parseDouble(properties.getProperty(prefix+"n_sigma"));
......@@ -484,6 +490,7 @@ public class CuasRtParameters {
cp.pose_corr_save = this.pose_corr_save; // By Claude on 07/04/2026
cp.pose_img_save = this.pose_img_save; // By Claude on 07/04/2026
cp.pose_stored = this.pose_stored; // By Claude on 07/04/2026
cp.rend_test = this.rend_test; // By Claude on 07/05/2026
cp.psf_radius = this.psf_radius;
cp.n_sigma = this.n_sigma;
cp.pyramid = this.pyramid;
......
......@@ -7289,7 +7289,20 @@ java.lang.NullPointerException
ImageDtt.THREADS_MAX, // int threadsMax,
debugLevel); // int debugLevel
}
if (clt_parameters.curt.pose_test) {
if (clt_parameters.curt.rend_test) {
// MINIMAL RT ingest+render certification (curt_rend_test, precedence over the pose
// test): per scene raw /jp4/ -> conditionSceneToGpu -> virtual-grid render at
// BORROWED stored pose + ERS rates -> -CUAS-RT-RENDER hyperstack, comparable
// slice-by-slice to the -CUAS-INDIVIDUAL/MERGED-CUAS-DBG oracle products.
// Certify/debug THIS chain first, only then the pose test (Andrey 07/05/2026).
// By Claude on 07/05/2026.
System.out.println("===== CUAS RT render test (curt_rend_test): ingest+render sequence vs oracle DBG =====");
com.elphel.imagej.cuas.rt.CuasRender.testRenderSequence(
clt_parameters, // CLTParameters clt_parameters,
master_CLT, // QuadCLT center_CLT,
quadCLTs, // QuadCLT [] quadCLTs,
debugLevel); // int debugLevel
} else if (clt_parameters.curt.pose_test) {
// RT pose-adjustment prototype phase A (curt_pose_test), runs INSTEAD of RT detection:
// re-generate per-scene 3-angle poses against the virtual-center reference, ascending,
// prediction-seeded, single pass on the final combo DSI. Output: -POSE-RT-TEST.csv +
......
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