Skip to content

Fix sign error in non-dispersive phase of main/diff low-high estimate - #433

Open
KarnakOza wants to merge 1 commit into
isce-framework:developfrom
KarnakOza:fix/m2-main-diff-low-high
Open

KarnakOza wants to merge 1 commit into
isce-framework:developfrom
KarnakOza:fix/m2-main-diff-low-high

Conversation

@KarnakOza

Copy link
Copy Markdown

Addresses #423.

Problem

In estimate_iono_main_diff_low_high, the non-dispersive phase was computed as
phi0_main / 2 + z_coeff * phi0_diff_low_high. With z_coeff as defined, the sign
of the second term is wrong: the returned non-dispersive phase approaches the
dispersive component rather than the non-dispersive one (e.g. a noiseless
N=3 rad, I=0 rad input returned N=0.000174 rad).

Because compute_unwrapp_error_main_diff_low_high assumes main = non_dispersive + dispersive,
this also produced spurious integer unwrapping coefficients on a synthetic field with
no injected unwrapping errors (N=148, I=-153 rad gave (48, 1)).

Fix

Flip the sign: non_dispersive = phi0_main / 2 - z_coeff * phi0_diff_low_high.
The dispersive expression is unchanged. Residual error in both components is the
expected finite-band approximation, bounded by eps = ((fh - fl) / (2 * f0))**2
(about 1.2e-4 here).

The tests assume the forward model phi(f) = (f/f0)*N + (f0/f)*I, with
phi0_main = phi(f0) and phi0_diff_low_high = phi(fh) - phi(fl) (high minus low).
The existing dispersive expression is consistent with this model; the non-dispersive
one was not. If the intended convention differs, please let me know.

I also considered non_dispersive = phi0_main - dispersive, which closes exactly but
moves all of the finite-band error into the non-dispersive term. Happy to switch if
maintainers prefer exact closure or a full 2x2 inversion.

Tests

New tests/python/packages/isce3/atmosphere/split_band_estimation.py, registered in CMake:

  • recovery of N and I, and main closure, within the finite-band bound
  • zero injected integer errors gives zero unwrapping coefficients

On the unpatched v0.25.22 install, 5 of 6 new tests fail; with this change all 6 pass,
along with the existing ionosphere.py tests (10 passed total). I validated by overlaying
the patched file onto the v0.25.22 conda install, not by a full source build.

Scope

This corrects the estimator only. Behaviour of the unwrapping-error correction on
genuinely contaminated data is not claimed to be solved here.

@KarnakOza KarnakOza changed the title Fix sign error in non-dispersive phase of main/diff low-high ionosphe… Fix sign error in non-dispersive phase of main/diff low-high estimate Nov 12, 2026
@hfattahi
hfattahi requested a review from oberonia78 November 18, 2026 02:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant