Root cause: abs(phase) has a constant background floor (~0.02 rad)
that was making flat regions display as 35% gray instead of black.
Fix: compute noise_floor = 50th percentile of abs(phase), subtract it,
then normalize — background becomes ~0 (black), edges remain bright.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous soft mode (morph_flag=False) used linear phase normalization
which spread noise across the full brightness range.
abs(phase) makes edges bright and flat regions dark, matching the
paper's Fig.4(C) style continuous edge map. Same fix applied to
phase_image output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous kernel incorrectly modified both amplitude and phase:
(W*R/(1+W*R)) * exp(-j*S*R/(1+R))
Corrected to unit-amplitude pure-phase kernel as defined in the paper:
K = exp(j * S * W*R/(1+W*R))
Also updated default thresholds to symmetric ±0.35 which is appropriate
for the corrected phase range of approximately [-S, S] = [-0.48, 0.48].
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>