Skip to content

ps: persistent scatterers identification

Commands of moraine.cli.ps (source); the same functions are called in Python as mc.<name>(...) with import moraine.cli as mc. The help below is generated from the docstrings, like moraine COMMAND --help.

command summary
amp-disp calculation the amplitude dispersion index from SLC stack.

amp-disp

calculation the amplitude dispersion index from SLC stack.

moraine amp-disp --rslc STR --adi STR [--chunks INT INT] [--out_chunks INT INT] [--cuda | --no-cuda] [--processes VALUE] [--n_workers VALUE] [--threads_per_worker VALUE]
argument type default description
--rslc str required input rslc stack, shape (nlines, width, nimages)
--adi str required output amplitude dispersion index, shape (nlines, width), float32
--chunks tuple[int, int] None data processing chunk size, same as rslc by default
--out_chunks tuple[int, int] None output data chunk size, same as chunks by default
--cuda bool False if use cuda for processing, false by default
--processes None use processes (True) or threads (False) for the workers, only for cpu processing. Default: False
--n_workers None number of workers. Default: 1 for cpu, one per GPU for cuda
--threads_per_worker None tasks a worker runs at the same time. Default: 1

Global options: --json, --traceback, --log FILE, -q / --quiet (conventions).

In a pipeline (examples/02_ps.toml, step adi):

[[step]]
name = "adi"
run = "amp-disp"
rslc = "raw/rslc.zarr"
adi = "ps/ras_adi.zarr"
cuda = false                      # reads the stack once and reduces it: the CPU is faster than starting a GPU worker

In Python:

import moraine.cli as mc
mc.amp_disp(rslc, adi, chunks=None, out_chunks=None, cuda=False, processes=None, n_workers=None, threads_per_worker=None)

The array function mr.amp_disp does the same on numpy / cupy arrays in memory.