Installation

Prerequisites

  • Python 3.12+
  • Rust toolchain required for source and editable installs of the native Rust/CPU extension
  • Recommended local runner: uv
  • Optional: triangle binary on PATH (triangulation workflows)
  • Optional: snaphu binary on PATH (legacy unwrap flow)
No Dockerfile is included. For containerized deployments, install package-level requirements and mount datasets as bind mounts.

Install from source / local checkout

git clone git@github.com:sirbastiano/pystamps.git
cd pystamps
uv sync
uv run pystamps describe-backends

describe-backends confirms which python, native, and optional cuda kernel providers are available.

Developer profile:

python -m pip install -e .
python -m pip install -e ".[dev]"

Editable installs compile the Rust-backed native module locally, so cargo --version must work before installation.

Install from PyPI

python -m pip install pystamps-insar

Supported platforms use prebuilt wheels for the Rust extension and bundled pystamps-native executable, so they do not need a local compiler toolchain.

Optional GPU backend:

python -m pip install "pystamps-insar[gpu]"

Configuration

  • Configuration path is passed via CLI flag --config.
  • Accepted formats: YAML or JSON.
  • When omitted, defaults from pystamps.config.RunConfig() are used.
runtime:
  backend: auto
  stage2_kernel_backend: native
  stage2_native_threads: 0
  kernel_backend_overrides:
    stage2_grid_accumulate: native
    stage2_histogram: native
    stage2_topofit: native
    stage2_topofit_row_invariant: native
    stage2_topofit_coh_row_invariant: native
    stage4_edge_stats: native
    stage7_scla: native
    stage8_edge_noise: native
  io_workers: 8
  cpu_workers: 0
  enable_mat_stage_cache: true
  stage2_checkpoint_mode: final
  stage2_checkpoint_interval: 1
  stage7_chunk_ps: 100000
  stage8_chunk_edges: 200000
compat:
  strict_reference: false
  reference_root: null
tolerance:
  rtol: 1e-5
  atol: 1e-7
  wrap_equivalence: true
  wrap_period: 6.283185307179586

Environment and directories

  • Repository has source assets under /tmp, inputs_and_outputs, and StaMPS.
  • Large validation artifacts are repository-local and not required for runtime package installation.

Troubleshooting

ImportError: No module named ...

Install editable mode from repo root and ensure terminal uses the same interpreter as current shell.

ConfigError: Config must be YAML or JSON

Provide .yml, .yaml, or .json file path.

No reference to triangle/snaphu

Binary lookups are environment-driven outside package import path; install and export PATH only when running legacy-dependent workflows.