API Reference
Classification methods:
Functions for scatterer selection related operations.
network_stm_selection(stm, min_dist, include_index=None, sortby_var='pnt_nmad', crs='radar', x_var='azimuth', y_var='range', azimuth_spacing=None, range_spacing=None)
Select a Space-Time Matrix (STM) from a candidate STM for network processing.
The selection is based on two criteria: 1. A minimum distance between selected points. 2. A sorting metric to select better points.
The candidate STM will be sorted by the sorting metric. The selection will be performed iteratively, starting from the best point. In each iteration, the best point will be selected, and points within the minimum distance will be removed. The process will continue until no points are left in the candidate STM.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stm |
Dataset
|
candidate Space-Time Matrix (STM). |
required |
min_dist |
int | float
|
Minimum distance between selected points. |
required |
include_index |
list[int]
|
Index of points in the candidate STM that must be included in the selection, by default None |
None
|
sortby_var |
str
|
Sorting metric for selecting points, by default "pnt_nmad" |
'pnt_nmad'
|
crs |
int | str
|
EPSG code of Coordinate Reference System of |
'radar'
|
x_var |
str
|
Data variable name for x coordinate, by default "azimuth" |
'azimuth'
|
y_var |
str
|
Data variable name for y coordinate, by default "range" |
'range'
|
azimuth_spacing |
float
|
Azimuth spacing, by default None. Required if crs is "radar". |
None
|
range_spacing |
float
|
Range spacing, by default None. Required if crs is "radar". |
None
|
Returns:
Type | Description |
---|---|
Dataset
|
Selected network Space-Time Matrix (STM). |
Raises:
Type | Description |
---|---|
ValueError
|
Raised when |
NotImplementedError
|
Raised when an unsupported Coordinate Reference System is provided. |
Source code in depsi/classification.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
|
ps_selection(slcs, threshold, method='nad', output_chunks=10000, mem_persist=False)
Select Persistent Scatterers (PS) from an SLC stack, and return a Space-Time Matrix.
The selection method is defined by method
and threshold
.
The selected pixels will be reshaped to (space, time), where space
is the number of selected pixels.
The unselected pixels will be discarded.
The original azimuth
and range
coordinates will be persisted.
The computed NAD or NMAD will be added to the output dataset as a new variable. It can be persisted in
memory if mem_persist
is True.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
slcs |
Dataset
|
Input SLC stack. It should have the following dimensions: ("azimuth", "range", "time").
There should be a |
required |
threshold |
float
|
Threshold value for selection. |
required |
method |
Literal['nad', 'nmad']
|
Method of selection, by default "nad". - "nad": Normalized Amplitude Dispersion - "nmad": Normalized median absolute deviation |
'nad'
|
output_chunks |
int
|
Chunk size in the |
10000
|
mem_persist |
bool
|
If true persist the NAD or NMAD in memory, by default False. |
False
|
Returns:
Type | Description |
---|---|
Dataset
|
Selected STM, in form of an xarray.Dataset with two dimensions: (space, time). |
Raises:
Type | Description |
---|---|
NotImplementedError
|
Raised when an unsupported method is provided. |
Source code in depsi/classification.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
IO methods:
depsi.io
io methods.
read_metadata(resfile, mode='raw', **kwargs)
Read metadata from a DORIS v5 resfile.
Modified from the original functions in: https://github.com/Pbaz98/Caroline-Radar-Coding-Toolbox/blob/main/gecoris/dorisUtils.py.
Source code in depsi/io.py
15 16 17 18 19 20 21 22 23 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 108 109 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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
|
slc methods:
depsi.slc
slc.py: Functions for SLC related operations.
ifg_to_slc(mother_slc, ifgs)
Convert a stack of interferograms to SLCs.
The conversion will be implemented by conjugated multiplication of the interferograms complex values with the complex values of the mother SLC, and then dividing by the squared magnitude of the mother complex.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mother_slc |
Dataset
|
Mother SLC. This Dataset should have three dimensions ('azimuth', 'range', 'time').
The 'azimuth' and 'range' dimensions should be the same as |
required |
ifgs |
Dataset
|
Interferograms. This Dataset should have three dimensions ('azimuth', 'range', 'time').
The 'azimuth' and 'range' dimensions should be the same as |
required |
Returns:
Type | Description |
---|---|
Dataset
|
SLCS converted from the interferograms. |