跳转至

02 PS candidates

Pipeline: examples/02_ps.toml. Tutorial: nbs/Tutorials/CLI/CampiFlegrei/02_ps.ipynb. Needs 01_load.

moraine run examples/02_ps.toml --workdir WORK

Set [vars] shape to the (nlines, width) of raw/rslc.zarr (--var shape=NLINES,WIDTH; the default is the sample data set) and [defaults] cuda = false without a GPU.

Steps

Two candidate sets are merged:

  1. Amplitude dispersion index (amp-disp, ADI = std / mean of the amplitude over time). Stable scatterers have a low ADI. Candidates: ras<0.4 (pc-logic-ras).
  2. Noise2Fringe temporal coherence: image-pairs (bandwidth 1, sequential pairs) -> n2f filters the interferograms -> temp-coh compares filtered and raw phase. Candidates: ras>0.58.
  3. pc-union of both sets, pc-hix + pc-sort to hilbert order, ras2pc takes rslc, e/n, lon/lat and ADI of the candidates.

Outputs (WORK/ps/): ps_can_hix.zarr (n_points,), ps_can_rslc.zarr (n_points, nimages), ps_can_{e,n,lon,lat,adi}.zarr; rasters ras_adi.zarr, ras_temp_coh.zarr, ras_n2f_intf.zarr; pyramids ras_adi_pyramid, ras_n2f_intf_pyramid (the filtered interferograms, averaged for the overview), ras_temp_coh_pyramid, ps_can_adi_pyramid; all pyramids but the rslc one are built with method = "mean", a multilook of the data, so the whole scene is readable.

Parameters

  • ADI threshold: 0.25-0.4 is common; lower = fewer, more stable points. With few images (< ~20) the ADI is noisy, so the n2f criterion matters more.
  • n2f temporal coherence threshold: 0.5-0.7; the tutorial uses 0.58.
  • n2f needs the models (moraine.download_dl_model()) and PyTorch; it is much faster with cuda, where the network runs in half precision (the phases are within about 1e-3 rad of the CPU result).
  • adi and n2f_temp_coh run on the CPU (cuda = false in the step): they read the stack once and reduce it, and starting a GPU worker costs more than the GPU saves. Their GPU versions stay available.

Expected results (sample data, Campi Flegrei, 981 x 4160 x 92)

result sample value sane range
ras_adi_pyramid p50 0.54, p01 0.26, p99 0.79, min 0.03 ADI >= 0; p50 roughly 0.3-1
ras_temp_coh_pyramid p50 0.43, p99 0.97, max 0.999 0 <= t_coh <= 1
candidates ADI < 0.4 148 706 a few % to ~30 % of the land pixels
candidates t_coh > 0.58 530 416
merged ps_can_hix 530 886 (22 % of the 2.42 million land pixels)

The t_coh counts vary by a few hundred between runs: the pixels without data get a random phase before the filtering, which moves the pixels near the threshold.

Run time: about 40 s with an A100 (n2f 18 s).

Figures

Quicklooks of the sample data run of 2026-10-10 (the numbers above are from the same run):

Amplitude dispersion index

Amplitude dispersion index (ps/ras_adi_pyramid): low on the stable scatterers of the towns.

Noise2Fringe temporal coherence

Noise2Fringe temporal coherence (ps/ras_temp_coh_pyramid): high on built-up areas, low on the crater lakes and vegetation.

The merged PS candidates on the map

The merged PS candidates on the map, coloured by their amplitude dispersion (ps/ps_can_adi_pyramid): Pozzuoli, Bacoli and the western suburbs of Naples, not the craters and slopes.

Checks

  • moraine info ps/ras_adi_pyramid ps/ras_temp_coh_pyramid: values within the ranges above, no warnings.
  • moraine quicklook ps/ras_n2f_intf_pyramid --index I -o intf.png: the I-th filtered sequential interferogram of the whole scene (averaged): fringes continuous, noise only where the coherence is low; the decimated raw/rslc_pyramid shows the same interferograms only zoomed in.
  • moraine quicklook ps/ras_temp_coh_pyramid -o tcoh.png: high coherence on built-up / rocky areas, low on vegetation and water.
  • moraine quicklook ps/ps_can_adi_pyramid -o ps.png: candidates spread over the stable areas.

Problems

  • Almost no candidates: check the ADI distribution; with a short stack raise the ADI threshold or rely on the n2f set.
  • n2f fails with a missing model file: run python -c "import moraine; moraine.download_dl_model()".
  • CUDA out of memory: only one GPU pipeline at a time; or set cuda = false.