Rust-backed 2D phase unwrapper for InSAR (`import whirlwind`)
Project description
whirlwind
Fast Rust-backed 2D InSAR phase unwrapping with Python bindings.
Whirlwind unwraps a complex interferogram and returns both unwrapped phase and connected-component labels. The NISAR comparison shows agreement with production SNAPHU on 2pi ambiguities, with lower runtime in the tested scenes.
The package is
whirlwind-insaron PyPI and GitHub; it imports aswhirlwind.
Quickstart
git clone https://github.com/scottstanie/whirlwind-insar.git
cd whirlwind-insar
pip install .
Source installs require Python 3.11+ and Rust.
Usage
import whirlwind as ww
unw, conncomp = ww.unwrap(igram, corr, nlooks=10.0, mask=mask)
igram is a complex wrapped interferogram, corr is coherence/correlation in [0, 1], and mask is optional with True for valid pixels.
For noisy scenes, coarsen the solve with downsample (it unwraps a
coherently-averaged copy at the given factor to pick each block's 2π cycle, then
maps the cycles back onto the full-resolution phase). nlooks stays the effective looks of your
input corr — the down-look scaling is handled internally, so you do not raise
it yourself:
unw, conncomp = ww.unwrap(igram, corr, nlooks=10.0, mask=mask, downsample=8)
CLI
The whirlwind CLI is at feature parity with the Python unwrap: every knob the
Python API exposes (downsample, the bridge post-pass, persistent-scatterer
interpolate, Goldstein filtering, and the connected-component cost controls) is
available as a flag. Run whirlwind unwrap --help for the full list.
Install
Pick whichever is simplest for you - no Python required for any of these:
-
Prebuilt binary (simplest, no toolchain). Download the archive for your platform from the latest release, unpack it, and run the
whirlwindexecutable. A single self-contained binary - handy for MATLAB users driving it viasystem('whirlwind unwrap ...'). -
From source with Cargo (needs the Rust toolchain):
cargo install --path crates/whirlwind-cli --locked
-
Docker (see below).
Run
whirlwind unwrap \
--phase wrapped_phase.tif \
--cor coherence.tif \
--mask valid_mask.tif \
--nlooks 10 \
--out unwrapped_phase.tif \
--conncomp conncomp.tif
--phase is a float32 TIFF of wrapped phase in radians. --mask is optional;
nonzero means valid. When --mask is omitted the CLI uses coherence > 0 as the
default valid mask, matching the Python API.
For noisy scenes, coarsen the solve with --downsample (as in the Python API);
the integration-component --no-bridge-able re-leveling pass runs by default:
whirlwind unwrap --phase wrapped_phase.tif --cor coherence.tif \
--mask valid_mask.tif --nlooks 10 --downsample 8 \
--out unwrapped_phase.tif
The CLI is pure Rust (no GDAL), so it also runs from a container. Pull the prebuilt image (published to the GitHub Container Registry by CI), or build it locally:
docker pull ghcr.io/scottstanie/whirlwind-insar:main # prebuilt, or:
docker build -t ghcr.io/scottstanie/whirlwind-insar . # build locally
docker run --rm -v "$PWD:/data" ghcr.io/scottstanie/whirlwind-insar unwrap \
--phase /data/wrapped.tif --cor /data/cor.tif --nlooks 10 \
--out /data/unw.tif --conncomp /data/conncomp.tif
Dolphin
Dolphin can select Whirlwind as an unwrap method:
dolphin unwrap --unwrap-options.unwrap-method whirlwind ...
See the Dolphin docs for the rest of the Dolphin workflow.
Development
uv sync
uv run maturin develop --release
uv run pytest python/tests
cargo test --workspace
More
Repository Layout
python/whirlwind: Python API.crates/whirlwind-core: Rust algorithms.crates/whirlwind-py: PyO3 bindings.crates/whirlwind-cli: CLI binary.docs: reference docs.scripts: benchmarks and development utilities.
License
Licensed under either the BSD 3-Clause License or the Apache License, Version 2.0, at your option. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whirlwind_insar-0.1.0.tar.gz.
File metadata
- Download URL: whirlwind_insar-0.1.0.tar.gz
- Upload date:
- Size: 215.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7745af2acf72c4ae57b2002082f01441909a71f6b35464d7e4d357f70f665c26
|
|
| MD5 |
b549d3220fcb16ef86c4b6bb9340feb2
|
|
| BLAKE2b-256 |
daa6d345b0ba5c75d2fde835f77d92c2694690c86c15e808bb07d9b7dd3a1ec4
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0.tar.gz:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0.tar.gz -
Subject digest:
7745af2acf72c4ae57b2002082f01441909a71f6b35464d7e4d357f70f665c26 - Sigstore transparency entry: 1779910035
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e940be81dab4197d239a91085f25e8165c77ca2e4e2e5f112825909ca1ec69f
|
|
| MD5 |
0760f5321e24d54cf081d215d08c8844
|
|
| BLAKE2b-256 |
a7aa13efc34910786adc23f905fbc2d2d040845fa67f4dcbc15b73d0a3a58041
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-win_amd64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-win_amd64.whl -
Subject digest:
8e940be81dab4197d239a91085f25e8165c77ca2e4e2e5f112825909ca1ec69f - Sigstore transparency entry: 1779910987
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37e8cc28e7be1df8906bd8d2097fb117591216c99fc78ee84d09b9eadcd9ab5d
|
|
| MD5 |
ecfa7a80115a0b256462948bfc580778
|
|
| BLAKE2b-256 |
3bdf7243ad6a3d926d5c620a0b006d89e0a3006fd14dd365e434b39b9459dc27
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
37e8cc28e7be1df8906bd8d2097fb117591216c99fc78ee84d09b9eadcd9ab5d - Sigstore transparency entry: 1779911191
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e27a9e7b97c351092ad3c7c418bbd8d4193a08466dcffdf2988f73ed0969cf1
|
|
| MD5 |
8d3602e81f5d885273f4fe960fe538e1
|
|
| BLAKE2b-256 |
26c8a95ba8faa672d60962c84763ceac3ce950eb9d8168cd87feae0563ac7d9f
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
2e27a9e7b97c351092ad3c7c418bbd8d4193a08466dcffdf2988f73ed0969cf1 - Sigstore transparency entry: 1779911408
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06c114b061fb7b41877ce36ab5c58589ee20dc84a02a03d8577a1518374483e6
|
|
| MD5 |
23558c389b6bc89bcf3e2215ba54071a
|
|
| BLAKE2b-256 |
dc79dd209578b785be8abc4dfe68617bafab36545162daa2e7c9a6b077b94e95
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
06c114b061fb7b41877ce36ab5c58589ee20dc84a02a03d8577a1518374483e6 - Sigstore transparency entry: 1779910791
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 982.0 kB
- Tags: CPython 3.11+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9a174f3d527fa902c7a99a50d166324bd19c533eaa8cd3a980b89df3b0ea5b4
|
|
| MD5 |
1d9ddefd5aa5bab8728e05ca9ec00f39
|
|
| BLAKE2b-256 |
1d669297c0487b38dd0801e3d5db1809afcc9aae282a61e622875bc4bf6e3821
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
f9a174f3d527fa902c7a99a50d166324bd19c533eaa8cd3a980b89df3b0ea5b4 - Sigstore transparency entry: 1779910551
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 917.6 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af539ca34491d9ac8f548e6654b5adf711f4ba3c1d2e9f1e75b4c8456901b4e5
|
|
| MD5 |
2464d9c3ece609f6eff2a56deb63c26f
|
|
| BLAKE2b-256 |
3854dd57dd1ba97603db498f90b650d0f572cb6170b66e7ad38fe53cac512f52
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
af539ca34491d9ac8f548e6654b5adf711f4ba3c1d2e9f1e75b4c8456901b4e5 - Sigstore transparency entry: 1779911755
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whirlwind_insar-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: whirlwind_insar-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
045170e09ad9c0e3c9738bdf024e9ddcaf4d2bb3c23980c9c4e3373d192e6a78
|
|
| MD5 |
851a164ffa1ab26e948387fd101a4a5d
|
|
| BLAKE2b-256 |
0cdc314574428062098ef63d195467046a9db0bf0c68c168ebd69ca5a30dc0f2
|
Provenance
The following attestation bundles were made for whirlwind_insar-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on scottstanie/whirlwind-insar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whirlwind_insar-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl -
Subject digest:
045170e09ad9c0e3c9738bdf024e9ddcaf4d2bb3c23980c9c4e3373d192e6a78 - Sigstore transparency entry: 1779911612
- Sigstore integration time:
-
Permalink:
scottstanie/whirlwind-insar@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scottstanie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d93eed3cf5498a0d40f737b8ec8958ca349992f2 -
Trigger Event:
push
-
Statement type: