• Andrey Filippov's avatar
    CLAUDE: Fix getInterseqScale() to use integer corr_inc for BX/AX/BY/AY positions · b691e9f3
    Andrey Filippov authored
    getInterseqScale() was calling getCorrIncExact() which returns 0.5*corr_offset
    for half_step mode instead of the actual integer keyframe step getCorrInc()
    (= corr_offset/2 with integer division). For odd corr_offset (e.g. 5) with
    half_step=true these differ: getCorrIncExact()=2.5 vs getCorrInc()=2.
    
    This caused getHalfBeforeAfterPixXY() to compute:
      after - before = RSLT_VX * 0.5   (wrong; observed by user)
    instead of:
      after - before = RSLT_VX * corr_inc/corr_offset = RSLT_VX * 0.4  (correct)
    
    recalcOmegas() uses the same interseq_scale in the inverse direction, so it
    also reconstructed RSLT_VX/VY incorrectly from neighbouring keyframe positions.
    
    Fix: use getCorrInc() (integer) in getInterseqScale() so that BX/AX positions
    correspond to actual raw-frame midpoints and the velocity round-trip is exact.
    
    Also adds an unambiguous convention comment near RSLT_VX/RSLT_VY in
    CuasMotionLMA.java documenting all required scale conversions.
    
    The omega calculation (getFrameVelocityScale * ifov * fps_raw) is independent
    of corr_inc and was already correct.
    Co-authored-by: 's avatarClaude <claude@elphel.com>
    b691e9f3
Name
Last commit
Last update
docs Loading commit data...
eclipse_project_setup Loading commit data...
focusing_data_files Loading commit data...
ij_macros Loading commit data...
ijplugins Loading commit data...
scripts Loading commit data...
src/main Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
Eyesis_Correction.xml Loading commit data...
INSTALL-CODEX-ECLIPSE.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
mcp.allowed.example Loading commit data...
pom.xml Loading commit data...