covariance
Module for estimating covariance matrices for stacks or single pixels.
Contains for CPU and GPU versions (which will not be available if no GPU).
coh_mat_single(slc_samples, neighbor_mask=None)
Given (n_slc, n_samps) SLC samples, get the (nslc, nslc) coherence matrix.
Note this requires slc_samples to be transposed from coh_mat_single.
Source code in src/dolphin/phase_link/covariance.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
estimate_stack_covariance(slc_stack, half_window, strides=DEFAULT_STRIDES, neighbor_arrays=None)
Estimate the linked phase at all pixels of slc_stack.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slc_stack
|
ArrayLike
|
The SLC stack, with shape (n_slc, n_rows, n_cols). |
required |
half_window
|
tuple[int, int]
|
A (named) tuple of (y, x) sizes for the half window. The full window size is 2 * half_window + 1 for x, y. |
required |
strides
|
tuple[int, int]
|
The (y, x) strides (in pixels) to use for the sliding window. By default (1, 1) |
DEFAULT_STRIDES
|
neighbor_arrays
|
ndarray
|
The neighbor arrays to use for SHP, shape = (n_rows, n_cols, *window_shape). If None, a rectangular window is used. By default None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
C_arrays |
ndarray
|
The covariance matrix at each pixel, with shape (n_rows, n_cols, n_slc, n_slc). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/dolphin/phase_link/covariance.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |