unwrap(whirlwind): expose the options added since the backend landed - #742
Open
scottstanie wants to merge 2 commits into
Open
unwrap(whirlwind): expose the options added since the backend landed#742scottstanie wants to merge 2 commits into
scottstanie wants to merge 2 commits into
Conversation
`WhirlwindOptions` has not kept up with whirlwind's own API, so several knobs were unreachable from a dolphin config. Adds them, with whirlwind's own defaults: - `conncomp_algorithm`, `conncomp_min_coherence`, `conncomp_reliability`, `conncomp_thicken` - the SNAPHU-style component grow (ww's default) and how conservatively it cuts. The older coherence-cost grow is still reachable as `conncomp_algorithm="linear"`, which is what the existing `cost_threshold` / `conncomp_sigma` / `conncomp_cycle_prob` apply to. - `bridge` - give disjoint components a consistent integer cycle. - `connect_gaps` / `connect_gaps_max_px` - draw phase paths across bounded runs of invalid pixels before the solve, then drop those synthetic pixels from both outputs, so the solver can pick a relative 2pi level between otherwise-independent regions. Off by default. - `goldstein_alpha` / `goldstein_psize` - ww's internal Goldstein filter. whirlwind runs Goldstein filtering and PS interpolation itself, in Rust, so `run_goldstein` / `run_interpolation` now route through those instead of dolphin's Python pre-process. Previously both ran, filtering the same interferogram twice. Requires whirlwind >= 0.10.0 for `connect_gaps`; whirlwind stays an optional dependency. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZgYKTv2qVefPeX9S7a6BN
dolphin always wants ww's SNAPHU-style ambiguity-wiggle grow with ThickenCosts on, which is what production SNAPHU does, so there is no reason to let a config pick anything else. Drops `conncomp_algorithm` and `conncomp_thicken` from `WhirlwindOptions` and pins both at the call site, rather than relying on ww's defaults, so a change upstream cannot silently alter dolphin's labels. That leaves `cost_threshold`, `conncomp_sigma` and `conncomp_cycle_prob` with nothing to tune: they only ever fed ww's legacy coherence-cost labeling. They are kept on the model so existing configs still load, but are documented as unused and are no longer passed through. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZgYKTv2qVefPeX9S7a6BN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WhirlwindOptionshas not kept up with whirlwind's own API, so several knobs have been unreachable from a dolphin config. This adds them, each keeping whirlwind's own default, so behavior is unchanged unless a config sets one.Connected components
Components are now always grown by whirlwind's SNAPHU-style ambiguity-wiggle algorithm with
ThickenCostson, which is what production SNAPHU does. That is pinned at the call site rather than left to whirlwind's defaults, so a change upstream cannot silently alter dolphin's labels, and the algorithm is deliberately not a config option.conncomp_min_coherenceandconncomp_reliabilityare new and tune how conservatively that grow cuts.This does mean the pre-existing
cost_threshold,conncomp_sigmaandconncomp_cycle_probhave nothing left to tune — they only ever fed whirlwind's legacy coherence-cost labeling, which dolphin no longer selects. They are kept on the model so existing configs still load, and documented as unused. Happy to delete them outright instead if a breaking config change is acceptable.Phase solve
bridge— give disjoint components a consistent integer cycle.connect_gaps/connect_gaps_max_px— draw phase paths across bounded runs of invalid pixels before the solve, then drop those synthetic pixels from both outputs, so the solver can pick a relative 2π level between regions that would otherwise be solved independently. Off by default. This is what levels NISAR's fixed-PRF sub-swaths.goldstein_alpha/goldstein_psize— whirlwind's internal Goldstein filter.Double pre-processing fix
whirlwind runs Goldstein filtering and PS interpolation itself, in Rust.
run_goldstein/run_interpolationwere running dolphin's Python pre-process and leaving whirlwind's own pass available, so a config that asked for Goldstein filtered the same interferogram twice. Those requests now route into whirlwind's versions instead, withpreprocess_options.alphataking precedence overgoldstein_alpha.Notes
whirlwind >= 0.10.0forconnect_gaps. whirlwind remains an optional dependency (imported inside the function), so nothing changes for installs without it.TestWhirlwindnow asserts what actually reachesww.unwrap, rather than only that the output files exist.ubuntu-latest/macos-14checks are a pre-existing CI break onmain(ModuleNotFoundError: No module named 'rich'while importingtests/conftest.py), not from this PR — the same failure is on Bump actions/setup-python from 6 to 7 in the actions group across 1 directory #737, Add Gaussian multilooking option for phase linking #734, and on an unrelated run from 2026-09-07.🤖 Generated with Claude Code
https://claude.ai/code/session_01GZgYKTv2qVefPeX9S7a6BN