Commit 042a0c4b authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: extract all curt_* into CuasRtParameters class (imp.curt), dialog order preserved

Per Andrey: move every curt_* parameter out of IntersceneMatchParameters into
its own class (like CLTParameters.imp/ofp/... peers), held as
IntersceneMatchParameters.curt = new CuasRtParameters(). All 61 params: field
decls, dialogQuestions/Answers, set/getProperties, clone. Access changes
imp.curt_X -> imp.curt.X (114 external sites across OpticalFlow/CuasDetectRT/
CuasPoseRT); short field names (curt_ prefix dropped, class name conveys it).

corr-xml COMPATIBLE (no conversion needed): delegated as
curt.set/getProperties(prefix+"curt_", props) with short keys, so full keys
stay ..._imp_curt_X byte-identical (verified: 61 old == 61 new).

Verified: compiles clean; 61 params in every section; dialogQ add* == dialogA
getNext* == 61, verbatim order (pairing preserved); interleaved non-curt
air_/fgnd_ decls intact. Relieves setProperties 54865->52127, dialogQuestions
22385->21267, clone -503B (the methods our pose work grows).

NOTE: getProperties READER stays 63291/65535 - its bloat is ~1103 NON-curt
getProperty reads (curt reads were already in getPropertiesCuasRT since 06/12);
relieving it needs a separate non-curt extraction (flagged for Andrey).
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 1c807750
......@@ -466,7 +466,7 @@ public class CuasPoseRT {
/**
* Re-generate per-scene poses against the virtual-center reference, RT-style.
*
* @param clt_parameters processing parameters (uses imp.curt_pose_str threshold,
* @param clt_parameters processing parameters (uses imp.curt.pose_str threshold,
* imp.lma_use_R, LMA/offset limits as the offline flow)
* @param center_CLT virtual-center reference: must have CenterClt (fclt) and
* the final combo DSI restored
......@@ -480,7 +480,7 @@ public class CuasPoseRT {
final QuadCLT center_CLT,
final QuadCLT [] quadCLTs,
final int debugLevel) {
final double min_str = clt_parameters.imp.curt_pose_str; // e.g. 1.0
final double min_str = clt_parameters.imp.curt.pose_str; // e.g. 1.0
final boolean use_lma_dsi = clt_parameters.imp.use_lma_dsi;
final int margin = clt_parameters.imp.margin;
final double mb_tau = clt_parameters.imp.mb_tau;
......@@ -530,9 +530,9 @@ public class CuasPoseRT {
// rank-N budget) and AND with the strength mask - a filtered run. Otherwise run FULL
// (all strength-selected tiles) and generate the calibration at the end.
boolean full_selection = true; // the tile calibration is (re)saved only from a full-selection run
ImagePlus imp_max = clt_parameters.imp.curt_pose_recalc ? null :
ImagePlus imp_max = clt_parameters.imp.curt.pose_recalc ? null :
center_CLT.readImagePlusFromModelDirectory(TILE_CALIB_SUFFIX);
if ((imp_max == null) && !clt_parameters.imp.curt_pose_recalc) { // legacy name fallback
if ((imp_max == null) && !clt_parameters.imp.curt.pose_recalc) { // legacy name fallback
imp_max = center_CLT.readImagePlusFromModelDirectory(TILE_CALIB_SUFFIX_OLD);
}
if (imp_max != null) {
......@@ -540,8 +540,8 @@ public class CuasPoseRT {
final boolean [] filt = deriveSelection(
fmax,
center_CLT.getTilesX(),
clt_parameters.imp.curt_pose_dxy_k,
clt_parameters.imp.curt_pose_num_tiles,
clt_parameters.imp.curt.pose_dxy_k,
clt_parameters.imp.curt.pose_num_tiles,
debugLevel);
int num_filt = 0;
for (int i = 0; i < reliable_ref.length; i++) {
......@@ -553,7 +553,7 @@ public class CuasPoseRT {
num_filt+" tiles (of "+num_reliable+" by strength)");
} else {
System.out.println("CuasPoseRT.testPoseSequence(): "+
(clt_parameters.imp.curt_pose_recalc ? "curt_pose_recalc ON" : TILE_CALIB_SUFFIX+" not found")+
(clt_parameters.imp.curt.pose_recalc ? "curt_pose_recalc ON" : TILE_CALIB_SUFFIX+" not found")+
" - FULL run, will generate the calibration");
}
final double [][] pXpYD_center = OpticalFlow.transformToScenePxPyD(
......@@ -620,7 +620,7 @@ public class CuasPoseRT {
}
// Phase B lean engine (curt_pose_lean): ImageDtt instance for the convert stage,
// created once (mirrors interCorrPair's construction)
final ImageDtt image_dtt_lean = clt_parameters.imp.curt_pose_lean ? new ImageDtt(
final ImageDtt image_dtt_lean = clt_parameters.imp.curt.pose_lean ? new ImageDtt(
center_CLT.getNumSensors(),
clt_parameters.transform_size,
clt_parameters.img_dtt,
......@@ -629,7 +629,7 @@ public class CuasPoseRT {
center_CLT.isLwir(),
clt_parameters.getScaleStrength(center_CLT.isAux()),
center_CLT.getGPU()) : null;
if (clt_parameters.imp.curt_pose_lean) {
if (clt_parameters.imp.curt.pose_lean) {
System.out.println("CuasPoseRT.testPoseSequence(): LEAN measurement engine (phase B): "+
"TD-average(16) x virtual-center single conj-multiply. NOTE: no MB compensation "+
"in lean v1 - compare against the NOMB baseline");
......@@ -666,7 +666,7 @@ public class CuasPoseRT {
// the upload alive through interCorrPair's own setBayerImages(false).
// A2 results legitimately diverge from phase A (cleaner input) - judge by own
// dstored quality. By Claude on 07/05/2026, from Andrey's design.
if (clt_parameters.imp.curt_pose_raw) {
if (clt_parameters.imp.curt.pose_raw) {
final boolean raw_ok = CuasConditioning.conditionSceneToGpu(
quadCLTs[nscene], // QuadCLT scene (jp4 + calibration + FPN)
null, // Config (defaults: rowcol + photometric + FPN)
......@@ -711,7 +711,7 @@ public class CuasPoseRT {
fail_reason[0] = 0;
final double [][][] coord_motion_rslt = new double [3][][]; // [centers, vector_XYS, eigen] of the last LMA cycle
double [][] pose;
if (clt_parameters.imp.curt_pose_lean) {
if (clt_parameters.imp.curt.pose_lean) {
pose = leanFitScene(
clt_parameters, // CLTParameters clt_parameters,
image_dtt_lean, // ImageDtt image_dtt,
......@@ -882,8 +882,8 @@ public class CuasPoseRT {
final boolean [] keep = deriveSelection(
fmax,
tilesX,
clt_parameters.imp.curt_pose_dxy_k,
clt_parameters.imp.curt_pose_num_tiles,
clt_parameters.imp.curt.pose_dxy_k,
clt_parameters.imp.curt.pose_num_tiles,
debugLevel);
final float [] fkeep = new float [num_pix];
for (int i = 0; i < num_pix; i++) fkeep[i] = keep[i] ? 1.0f : 0.0f;
......
......@@ -7239,7 +7239,7 @@ java.lang.NullPointerException
// Moved to the very end, after 3D
// boolean test_vegetation = true;
if (master_CLT.hasCenterClt() && clt_parameters.imp.cuas_targets_en && !clt_parameters.imp.curt_en) { // cuas mode
if (master_CLT.hasCenterClt() && clt_parameters.imp.cuas_targets_en && !clt_parameters.imp.curt.en) { // cuas mode
if (debugLevel >-3) {
System.out.println("===== Running CUAS ranging in Oracle mode. =====");
}
......@@ -7264,7 +7264,7 @@ java.lang.NullPointerException
// Generate the merged-CUAS stack on the GPU EXPLICITLY here (CuasRanging.prepareFpixels() uses the CUDA
// tile-processor kernels - may be incompatible with a future CUDA), then hand the plain ImagePlus to the
// CUDA-free CuasDetectRT. By Claude on 06/24/2026
if (clt_parameters.imp.curt_en && master_CLT.hasCenterClt()) {
if (clt_parameters.imp.curt.en && master_CLT.hasCenterClt()) {
System.out.println("===== Running CUAS RT detection (curt_en). =====");
CuasRanging cuasRangingRT = new CuasRanging(
clt_parameters, // CLTParameters clt_parameters,
......@@ -7274,7 +7274,7 @@ java.lang.NullPointerException
ImagePlus imp_targets = cuasRangingRT.prepareFpixels(); // GPU generator (explicit, CUDA-sensitive); also builds the QuadCLT instances = borrowed-calibration source
if (clt_parameters.imp.curt_calib) {
if (clt_parameters.imp.curt.calib) {
// By Claude on 07/03/2026: first step of the CUAS RT processing flow - per-sensor photometric
// (re)calibration: fit a+b*x over safe (weak/far) tiles, fold into the 16+16 lwir offsets/scales,
// apply in memory (master_CLT + reference scene + quadCLT_main -> top-menu config, template for
......@@ -7285,11 +7285,11 @@ java.lang.NullPointerException
master_CLT, // QuadCLT master_CLT (combo DSI source, in-memory apply)
quadCLTs[ref_index], // QuadCLT ref_scene (photometric owner, INTERFRAME corr-xml)
quadCLT_main, // QuadCLT quadCLT_main (main config + new-instance template)
clt_parameters.imp.curt_cond_test, // boolean save_stacks
clt_parameters.imp.curt.cond_test, // boolean save_stacks
ImageDtt.THREADS_MAX, // int threadsMax,
debugLevel); // int debugLevel
}
if (clt_parameters.imp.curt_pose_test) {
if (clt_parameters.imp.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 +
......@@ -7301,14 +7301,14 @@ java.lang.NullPointerException
master_CLT, // QuadCLT center_CLT,
quadCLTs, // QuadCLT [] quadCLTs,
debugLevel); // int debugLevel
} else if (clt_parameters.imp.curt_cond_test) {
} else if (clt_parameters.imp.curt.cond_test) {
// Conditioning/calibration diagnostic (curt_cond_test), runs INSTEAD of RT detection:
// raw /jp4/ baseline (no photometric/FPN/conditioning), saved as -CUAS-PERSENSOR-RAW for
// side-by-side compare with the conditioned -CUAS-PERSENSOR (saved by the calibration step when
// curt_calib is on, or rendered here otherwise). Both stacks use the same uniform sensor-domain
// task grid - never leftover GPU task state. By Claude on 07/01/2026, restructured 07/03/2026.
System.out.println("===== CUAS RT conditioning test (curt_cond_test): per-sensor average spread =====");
if (!clt_parameters.imp.curt_calib) { // conditioned baseline not yet rendered by the calibration step
if (!clt_parameters.imp.curt.calib) { // conditioned baseline not yet rendered by the calibration step
QuadCLT cond_phys = master_CLT.getGPUQuad().getQuadCLT(); // physical scene bound to the GPU
if (cond_phys != null) { // the actual image_data (bypass image_data_alt), same grid as raw
CuasMotion.perSensorFromData(clt_parameters, master_CLT, cond_phys.getOrigImageData(),
......
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