ps: persistent scatterers identification¶
moraine.cli.ps 的命令(源码);同样的函数在 Python 里以 mc.<name>(...) 调用(import moraine.cli as mc)。下面的帮助由 docstring 生成,与 moraine COMMAND --help 相同(docstring 为英文)。
| 命令 | 摘要 |
|---|---|
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]
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
--rslc |
str | 必需 | input rslc stack, shape (nlines, width, nimages) |
--adi |
str | 必需 | 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 |
全局选项:--json、--traceback、--log FILE、-q / --quiet(约定)。
在 pipeline 文件中(examples/02_ps.toml,步骤 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
在 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)
数组函数 mr.amp_disp 对内存中的 numpy / cupy 数组做同样的事。