pqm: Pixel quality metrics (CLI)¶
Commands of moraine.cli.pqm (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 |
|---|---|
temp-coh |
temporal coherence. |
temp-coh¶
temporal coherence.
moraine temp-coh --intf STR --rslc STR [--t_coh STR] [--image_pairs FILE] [--chunks INT INT] [--cuda | --no-cuda] [--processes VALUE] [--n_workers VALUE] [--threads_per_worker VALUE]
| argument | type | default | description |
|---|---|---|---|
--intf |
str | required | input (filtered) interferograms or coherence, complex64, shape (n_points, n_image_pairs) or (nlines, width, n_image_pairs) |
--rslc |
str | required | input rslc stack or phase history, complex64, shape (n_points, nimages) or (nlines, width, nimages) |
--t_coh |
str | None |
output temporal coherence, shape (n_points,) or (nlines, width) |
--image_pairs |
np.ndarray | None |
image pairs (reference, secondary) of intf, shape (n_image_pairs, 2); all image pairs by default |
--chunks |
int | tuple[int, int] | None |
point chunk size or (azimuth, range) chunk size, same as intf 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 n2f_temp_coh):
[[step]]
name = "n2f_temp_coh"
run = "temp-coh"
intf = "ps/ras_n2f_intf.zarr"
rslc = "raw/rslc.zarr"
t_coh = "ps/ras_temp_coh.zarr"
image_pairs = "ps/pairs_seq.txt"
cuda = false # reads the stack once and reduces it: the CPU is faster than starting a GPU worker
Also in examples/04_refine.toml (step temp_coh).
In Python:
import moraine.cli as mc
mc.temp_coh(intf, rslc, t_coh=None, image_pairs=None, chunks=None, cuda=False, processes=None, n_workers=None, threads_per_worker=None)
The array function mr.temp_coh does the same on numpy / cupy arrays in memory.