co: Covariance and coherence matrix estimation (CLI)¶
Commands of moraine.cli.co (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 |
|---|---|
emperical-co-pc |
estimate emperical coherence matrix on point cloud data. |
emperical-co-pc¶
estimate emperical coherence matrix on point cloud data.
moraine emperical-co-pc --rslc STR --is_shp_dir STR --gix STR --coh_dir STR [--n_looks_dir STR] [--image_pairs FILE] [--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) |
--is_shp_dir |
str | required | input directory with the SHP bool arrays of the points, one zarr per raster chunk, made by ras2pc_ras_chunk |
--gix |
str | required | input grid index of the point cloud (azimuth, range), shape (n_points, 2), int |
--coh_dir |
str | required | output directory with the complex coherence of the image pairs of the points, shape (n_points, n_image_pairs), one zarr per raster chunk; merge with pc_concat and the key of ras2pc_ras_chunk |
--n_looks_dir |
str | None |
output directory with the effective number of independent looks of the SHP set of each point, float32, shape (n_points,), one zarr per raster chunk (merge as coh_dir): the number of independent looks with the same variance of the coherence estimate as the correlated SHPs, from their positions and the speckle correlation of rslc; input n_looks of ds-temp-coh |
--image_pairs |
np.ndarray | None |
input image pairs (element in the coherence matrix) to be calculated, all image pairs by default |
--chunks |
tuple[int, int] | None |
parallel processing (azimuth, range) chunk size. Default: rslc.chunks[:2] |
--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: 2 |
Global options: --json, --traceback, --log FILE, -q / --quiet (conventions).
In a pipeline (not used by the example pipelines; required arguments only):
[[step]]
name = "emperical_co_pc"
run = "emperical-co-pc"
rslc = "..."
is_shp_dir = "..."
gix = "..."
coh_dir = "..."
In Python:
import moraine.cli as mc
mc.emperical_co_pc(rslc, is_shp_dir, gix, coh_dir, n_looks_dir=None, image_pairs=None, chunks=None, cuda=False, processes=None, n_workers=None, threads_per_worker=None)
The array function mr.emperical_co_pc does the same on numpy / cupy arrays in memory.