ps

persistent scatterers identification
import zarr
from matplotlib import pyplot as plt
import colorcet
from moraine.utils_ import is_cuda_available

source

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/','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())
fig, ax = plt.subplots(1,1,figsize=(10,10))
pcm = ax.imshow(adi_cpu,vmin=0,vmax=1)
ax.set(title='Amplitude Dispersion Index',xlabel='Range Index',ylabel='Azimuth Index')
fig.colorbar(pcm)
fig.show()