Skip to content

Modern Radar Interferometry Environment

moraine

InSAR post-processing for the big data era: persistent and distributed scatterers, phase linking, deep learning filters and phase unwrapping, on GPUs, on arrays you can read, with a command line that AI agents speak.

Get started Talk to an agent Command line Python API

  • numpy / cupy in memory, zarr on disk
  • dask on CPUs and multiple GPUs
  • pipelines that resume
  • --json for scripts and agents

AI + InSAR

One sentence to a deformation time series

moraine ships with instructions for coding agents (AGENTS.md) and a command line whose help, checks and JSON output are made for them. You describe the data and what you want; the agent runs the verified pipelines, looks at the results and reports. This is the beginning of a real session, recorded on the Campi Flegrei data set (Sentinel-1, 92 dates); the whole of it is on the Talk to an agent page.

you

Process the GAMMA data in data/CampiFlegrei/gamma (reference 20200707) up to phase unwrapping, working directory manual_demo/campi. Tell me what you see.

AI

I read AGENTS.md and the guide of the first workflow, then start with the load pipeline:

$ moraine run examples/01_load.toml --workdir manual_demo/campi \ --var gamma=data/CampiFlegrei/gamma --var reference=20200707 --var geo=20200707 rslc load-gamma-flatten-rslc ... done (125.8 s) rslc_pyramid ras-pyramid ... done (20.9 s) pipeline finished: 7 steps, 161.8 s

The stack is (981, 4160, 92) complex64; 40 % of the pixels are nan, which is the Gulf of Pozzuoli masked by the coregistration, as the data set description says. Next: PS candidates.

AI

... four pipelines and 500 s of processing later: 223 875 refined points, unwrapped. The interferogram between the first and the last image shows the uplift of the caldera as about ten fringes centred on Pozzuoli.

interferogram 2019-01-02 / 2021-12-29 of the refined points of Campi Flegrei

Two things to decide: the DS threshold and the reference point

The chain

From GAMMA results to unwrapped phase in five pipelines

Verified on the Campi Flegrei data set (Sentinel-1, 92 dates, 981 x 4160 pixels) before every change; each one has a guide with the parameters, the expected ranges and the checks. The figures are from that run. Workflows

raw sequential interferogram
01 load GAMMA results to zarr; a raw 1 x 1 look interferogram
Noise2Fringe temporal coherence
02 PS amplitude dispersion and Noise2Fringe temporal coherence
phase linked DS interferogram
03 DS SHP, coherence matrices, EMI phase linking, DS selection
refined points interferogram
04 refine PS + DS, Noise2Fringe Transformer, temporal coherence
unwrapped interferogram
05 unwrap minimum cost flow on a Delaunay network

What is inside

A collection of functions, not a workflow

PS and DS selection

Amplitude dispersion, statistically homogeneous pixels by a Kolmogorov-Smirnov test, DS candidates and their coherence matrices. ps, shp, co

Phase linking

EMI with an adaptive regularization for coherence matrices that are not positive definite, the weighted temporal coherence and the connectivity of the coherent image pairs. pl

Deep learning filters

Noise2Fringe on rasters and the Noise2Fringe Transformer on point clouds: trained models, PyTorch, no clean data needed. dl

Phase unwrapping

Minimum cost flow on a Delaunay network of points, EMCF on any network of image pairs, correction of unwrapping errors by phase closure. unwrap

Big data

Arrays in memory are numpy or cupy, on disk zarr; the commands process chunks with their own workers on CPUs or several GPUs, larger than memory. Concepts

Agent ready

Every function is a command with complete help, --json output and pipelines that resume where they stopped. Command line, Pipeline files

Three ways in

Python, command line or conversation

import moraine as mr          # arrays in memory (numpy on the CPU, cupy on the GPU)
import moraine.cli as mc      # zarr in, zarr out, chunk by chunk

ph = mr.emi(coh)              # phase linking of a block of points
mc.emi('ds/coh.zarr', 'ds/ph.zarr', cuda=True)   # the same for a whole data set
moraine list                                    # every processing command
moraine emi --help                              # arguments with shapes, dtypes and defaults
moraine run examples/02_ps.toml --workdir WORK  # a verified pipeline; rerun to resume
moraine info ps/ras_adi_pyramid                 # statistics of a result without loading it
moraine quicklook ps/ras_adi_pyramid -o adi.png # a picture of the whole scene

process the GAMMA data in /data/site_a (reference 20220620) up to unwrapping in /work/site_a

Any coding agent that works in the repository (Claude Code, Codex, Cursor, ...) reads AGENTS.md and does the rest. See Talk to an agent.

Install with pip install moraine (CPU) or add cupy and numba-cuda with conda for the GPU: Install.