sarpyx is a specialized Python toolkit for Synthetic Aperture Radar (SAR) processing with tight integration to ESA SNAP. It focuses on reproducible SAR workflows, SNAP GPT orchestration, fast tiling, validation, and research features such as sub-aperture decomposition.
- SNAP v13 ported into a conda package no needing additional installations.
- SNAP GPT integration with configurable graphs and operator chaining.
- WorldSAR preprocessing, tiling, validation, and H5-to-Zarr conversion.
- Generic pipeline CLI with built-in recipes for Sentinel-1, TSX, CSG, Biomass, NISAR, and Sentinel-1 InSAR.
- Sub-aperture decomposition for Sentinel-style BEAM-DIMAP products.
- Geocoded outputs ready for GIS and downstream ML.
- Utilities compatible with
rasterio,geopandas,pyproj,h5py,zarr, anddask.
sarpyx --help # Top-level command dispatcher
sarpyx worldsar --help # WorldSAR preprocessing, tiling, validation, H5-to-Zarr
sarpyx pipeline --help # Explicit built-in or external pipeline recipes
sarpyx-worldsar --help # Compatibility WorldSAR entry point
sarpyx-pipeline --help # Compatibility pipeline entry pointThe recommended installation uses conda first to provide ESA SNAP and gpt, then installs sarpyx with pip from this checkout. This keeps SNAP/native dependencies managed by conda while keeping the Python package editable.
conda create -n sarpyx -c sirbastiano/label/dev -c conda-forge \
python=3.12 pip snap13=13.0.0
conda activate sarpyx
python -m pip install -e .Verify the installation:
gpt -h
sarpyx --help
sarpyx worldsar --help
sarpyx pipeline --helpFor development and tests:
python -m pip install -e ".[copernicus]"
python -m pip install pytest
pytest -qUsing uv for repository maintenance
uv sync
uv sync --group dev
uv sync --group dev --extra copernicus
uv run pytest -q
uv buildPublished pip package
python -m pip install sarpyxThe pip package is suitable for Python-side usage, but SNAP GPT workflows require a working SNAP installation available in the environment.
For container workflows, use the Docker Compose CLI plugin:
docker compose version
make recreateAt startup, the container expects a mounted grid file. Provide either GRID_PATH or place a *.geojson file under /workspace/grid.
mkdir -p ./grid
# put any grid GeoJSON here, e.g. ./grid/my_region.geojson
docker compose upYou can also pass --grid-path to sarpyx worldsar.
Maintainers: Roberto Del Prete, Gabriele Daga, Sebastian Fieldhouse, Juanfrancisco Amieva, Cedric Leonard, Valerio Marsocci, Eva Gmelich Mejling
