Skip to main content

FastSAR

License: MIT Python 3.10+

FastSAR forms synthetic aperture radar (SAR) images on x86 and ARM CPUs, Nvidia GPUs and Google Cloud TPUs from Python. It reads frequency-domain CPHD files (versions 1.0, 1.1 and 0.3) and NISAR, Sentinel-1 and ALOS PALSAR raw data, forms spotlight, stripmap and sliding spotlight images by factorized backprojection, and provides autofocus, interferometry, geolocation, map GeoTIFFs and SICD output.

FastSAR image of the Panama Canal's Pacific entrance from an Umbra spotlight collection

Panama Canal, Pacific entrance (Umbra open data, 2023-07-18): 12,207 by 8,808 pixels in 3.0 s on an Nvidia L4 (warm former, transfers included; float32, -59.9 dB against the float64 reference of precision.md), downsampled. A c4d-highmem-16 CPU instance (16 vCPUs, 8 cores) takes 11.2 s. The fastest open-source exact backprojection that forms this collection, the sar_bp example of NVIDIA's MatX, takes 12.5 s on the L4 as shipped and 11.6 s with float64 pixel coordinates, against 10.9 s for FastSAR's exact backprojection at the same accuracy; on the CPU, ISCE3 would take an estimated 4.8 h.

Cost per 1000 images against error for FastSAR and six open-source implementations

Cost per 1000 Panama images (October 2026 prices) against error over the lock, port and ship regions (FastSAR relative to a float64 backprojection at 64 times oversampling, the open-source codes to the float64 reference; performance, comparison).

Install

Linux on x86-64 or 64-bit ARM and macOS on Apple silicon, Python 3.10 to 3.13. The CPU kernels compile on first use: with g++ and OpenMP on Linux (GCC 12 or later on ARM; Debian and Ubuntu: apt install g++), with Apple's clang on macOS (the command line tools, xcode-select --install, which also serve the Metal backend of ExactFormer on Apple GPUs); the cuda extra needs an Nvidia driver for CUDA 12 and the tpu extra a Cloud TPU VM.

pip install fastsar                  # CPU (and JAX on whatever device it has)
pip install "fastsar[io]"            # io: sarpy for CPHD and SICD
pip install "fastsar[cuda]"          # cuda: CuPy for Nvidia GPUs
pip install "fastsar[tpu]"           # tpu: jax[tpu] for Cloud TPUs
pip install "fastsar[geo]"           # geo: rasterio for GeoTIFFs and DEMs
pip install "fastsar[raw]"           # raw: h5py for the NISAR raw reader
pip install "fastsar[cuda,io,geo]"   # extras combine

From a clone: pip install -e ".[cuda,io]" or uv sync. The CUDA tensor-core kernels (float16, and float32 on compute capability 8.0 and later) need nvcc from the CUDA toolkit; without it float32 runs on the CUDA cores, more slowly. On the CPU set OMP_NUM_THREADS=<physical cores> OMP_PLACES=cores OMP_PROC_BIND=close. Importing fastsar sets XLA_PYTHON_CLIENT_PREALLOCATE=false unless it is already set, so that JAX does not reserve most of a GPU's memory before the CUDA kernels run (performance.md).

Quickstart

The chain below reads a CPHD file and writes a GeoTIFF and a SICD, so it needs pip install "fastsar[io,geo]".

import fastsar
from fastsar import products

out = fastsar.form_cphd('scene_CPHD.cphd')        # mode, grid and window from the file
img = out['image']                                # complex64 [nx, ny] on a ground plane at the scene height
lat, lon, h = products.geolocate(out, 100, 200)   # pixel (100, 200) on the ground
products.write_geotiff('amp.tif', **products.geocode_image(out))   # amplitude on a north-up UTM grid
products.write_sicd('scene.nitf', out)            # complex image with its geometry

examples/chain.py runs this chain from the command line (--simulate needs no data); form_umbra.py and form_capella_stripmap.py form vendor grids.

Supported data, modes and devices

Data Modes Status
Capella CPHD stripmap, spotlight, sliding spotlight checked against vendor SICDs; a 2022 dynamic stripmap is correct near the center only
Umbra CPHD spotlight three open-data collections on the vendor's grid
ICEYE CPHD dwell spotlight formed (28 GB history); not compared with the vendor image
NISAR L0B (RRSD) stripmap io.read_nisar; corner reflectors placed against the survey and JPL's RSLC
Sentinel-1 Level-0 stripmap, wave io.read_sentinel1; IW and EW bursts not split
ALOS PALSAR level 1.0 stripmap (FBS, FBD) io.read_palsar; ScanSAR not handled
TOA-domain CPHD not supported
Simulated echoes stripmap, ScanSAR, TOPS, any track fastsar.stripmap, burst, patches
CPU (cpu) Nvidia GPU (cuda) Cloud TPU (tpu) Any JAX device (jax)
Factorized backprojection C++ (OpenMP on Linux): AVX-512 or AVX2 on x86-64, NEON on ARM CUDA via CuPy Pallas JAX program
Precision float32 float32, float16 three-pass (default), single-pass float32, float16
Exact backprojection (ExactFormer) C++ (OpenMP on Linux), float32 with float64 tile centers CUDA, the same falls back to jax float32, float64 block centers

Polar format (algorithm='pfa') runs as a JAX program on any device.

Documentation

docs/README.md lists every page; start with the processing chain. Measurement records are in sar-accel-study. To cite FastSAR, use CITATION.cff.

Contributing and license

CONTRIBUTING.md explains how to run the tests (GitHub Actions runs the CPU suite; the CUDA and TPU tests run on those machines before a release). MIT license (LICENSE).

Metadata

Release files for fastsar 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastsar 0.1.8
File Size Uploaded Provenance Actions
fastsar-0.1.8.tar.gz 333.5 kB Without provenance Details for fastsar-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fastsar 0.1.8
File Interpreter ABI Platform Actions
fastsar-0.1.8-py3-none-any.whl Python 3 none any Details for fastsar-0.1.8-py3-none-any.whl

Total release size: 571.1 kB

Release files / fastsar-0.1.8.tar.gz

Download URL fastsar-0.1.8.tar.gz
Size 333.5 kB
Tags Source
SHA-256 checksum
How to use checksums
07bac90725c2b3e69ae9c2f986a77cd0d8ef2a36a248fd8772ae5ee08338b96e
BLAKE2b-256 checksum
How to use checksums
eb0963c716a7ebc76acc9eec036b0c903afddb803d65c130a1372cc01fae0032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / fastsar-0.1.8-py3-none-any.whl

Download URL fastsar-0.1.8-py3-none-any.whl
Size 237.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38528ec9e16ae399f56d18d3da34eed67ba7fedef92e5e81431c43bf7e454f32
BLAKE2b-256 checksum
How to use checksums
eadbcec5684934d8c1eb50c0c3b2a5e78d49175a8a8571af8ffa75cae6494950
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for fastsar 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page