shp
estimate_neighbors(*, halfwin_rowcol, alpha, strides=None, mean=None, var=None, nslc=None, amp_stack=None, is_sorted=False, method=ShpMethod.GLRT, prune_disconnected=False)
Estimate the statistically similar neighbors of each pixel.
GLRT method on the [Parizzi and Brcic, 2011]. Assumes Rayleigh distributed amplitudes ([Siddiqui, 1962]).
| Parizzi and Brcic, 2011 | Parizzi A. and Brcic R., 2011. Adaptive InSAR Stack Multilooking Exploiting Amplitude Statistics: A Comparison Between Different Techniques and Practical Results. IEEE Geoscience and Remote Sensing Letters. 8, pp.441--445. 10.1109/LGRS.2010.2083631 |
| Siddiqui, 1962 | Siddiqui M., 1962. Some Problems Connected with Rayleigh Distributions. Journal of Research of the National Bureau of Standards, Section D: Radio Propagation. 66D, pp.167. 10.6028/jres.066D.020 |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
halfwin_rowcol
|
Tuple[int, int]
|
Half window dimensions as a tuple (rows, columns). |
required |
alpha
|
float
|
Significance level (0 < alpha < 1). |
required |
strides
|
dict[str, int]
|
Strides for the x and y dimensions, by default {"x": 1, "y": 1}. |
None
|
mean
|
Optional[ArrayLike]
|
Mean of the amplitude stack, by default None. |
None
|
var
|
Optional[ArrayLike]
|
Variance of the amplitude stack, by default None. |
None
|
nslc
|
Optional[int]
|
Number of samples, by default None. |
None
|
amp_stack
|
Optional[ArrayLike]
|
Amplitude stack, by default None. |
None
|
is_sorted
|
bool
|
Whether the amplitude stack is sorted (if passed), by default False. |
False
|
method
|
ShpMethod
|
Method used for estimation, by default ShpMethod.GLRT. |
GLRT
|
prune_disconnected
|
bool
|
If True, keeps only SHPs that are 8-connected to the current pixel. Otherwise, any pixel within the window may be considered an SHP, even if it is not directly connected. |
False
|
Returns:
| Type | Description |
|---|---|
Optional[ndarray]
|
Array of estimated statistically similar neighbors. |
Raises:
| Type | Description |
|---|---|
ValueError
|
|
Source code in src/dolphin/shp/__init__.py
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 | |