MotionbyLearning / DePSI

Python implementation of Delft PS-InSAR (DePSI) processing package
Apache License 2.0
6 stars 1 forks source link

`generate_arcs` function #16

Open rogerkuou opened 2 months ago

rogerkuou commented 2 months ago

Create a function to generate arcs of a network from an STM.

import xarray as xr
from pydepsi.network import generate_arcs

stm_points = xr.open_zarr(`exmaple_stm.zarr`)

stm_arcs = generate_arcs(stm_points, method='delaunay')
def generate_arcs(stm_points, method='delaunay', min_length=50, max_length=1000, x='lon', y='lat'):
  pass

args:

return

For delauney implementation, consider this one from scipy

Freek will provide the current implementation of redundant in MATLAB:

Example notebook of retrieving and sparsing a STM: network.zip

FreekvanLeijen commented 2 months ago

@vanlankveldthijs You can find descriptions of the existing Matlab implementations in my thesis, see

https://resolver.tudelft.nl/uuid:5dba48d7-ee26-4449-b674-caa8df93e71e

Networks: page 50. Overall processing flow, see page 31.

FreekvanLeijen commented 1 month ago

@vanlankveldthijs As discussed, I realized that the Delaunay triangulation is also used in another function, where it is used to create a set of short, independent arcs between points. (Max 1 arc per point, not all points need to be used necessarily.)

See https://bitbucket.org/grsradartudelft/depsi/src/master/main/ps_vce.m

It would be nice if the (scipy) Delaunay function we are going to use, enables the same functionality (that is, provides the indices etc needed. But I guess it will.)

vanlankveldthijs commented 1 month ago

We decided not to add any attributes to the arcs. These can be collected from the points referenced.