pqm: Pixel quality metrics (CLI)¶
moraine.cli.pqm 的命令(源码);同样的函数在 Python 里以 mc.<name>(...) 调用(import moraine.cli as mc)。下面的帮助由 docstring 生成,与 moraine COMMAND --help 相同(docstring 为英文)。
| 命令 | 摘要 |
|---|---|
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]
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
--intf |
str | 必需 | input (filtered) interferograms or coherence, complex64, shape (n_points, n_image_pairs) or (nlines, width, n_image_pairs) |
--rslc |
str | 必需 | 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 |
全局选项:--json、--traceback、--log FILE、-q / --quiet(约定)。
在 pipeline 文件中(examples/02_ps.toml,步骤 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
也用于 examples/04_refine.toml(步骤 temp_coh)。
在 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)
数组函数 mr.temp_coh 对内存中的 numpy / cupy 数组做同样的事。