import zarr
from matplotlib import pyplot as plt
import colorcet
from moraine.utils_ import is_cuda_availableps
persistent scatterers identification
amp_disp
amp_disp (rslc:numpy.ndarray)
calculation the amplitude dispersion index from SLC stack.
| Type | Details | |
|---|---|---|
| rslc | ndarray | rslc stack, 3D numpy array or cupy array |
| Returns | ndarray | dispersion index, 2D numpy array or cupy array |
Using amplitude dispersion index (ADI) to identify persistent scatterers is first used in (Ferretti, Prati, and Rocca Jan./2001).
Ferretti, A., C. Prati, and F. Rocca. Jan./2001. “Permanent Scatterers in SAR Interferometry.” IEEE Transactions on Geoscience and Remote Sensing 39 (1): 8–20. https://doi.org/10.1109/36.898661.
Usage:
rslc = zarr.open('../CLI/raw/rslc.zarr/',mode='r')[:]
adi_cpu = amp_disp(rslc)
if is_cuda_available():
rslc_gpu = cp.asarray(rslc)
adi_gpu = amp_disp(rslc_gpu)
np.testing.assert_array_almost_equal(adi_cpu,adi_gpu.get())