Open rogerkuou opened 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.
@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.)
We decided not to add any attributes to the arcs. These can be collected from the points referenced.
Create a function to generate arcs of a network from an STM.
args:
stm_points
: input Space-Time Matrix in form of Xarray.Dataset.method
: ways to form the network"delaunay" or "redundant"min_length
/max_length
: min/max length of the generated arcx
/y
: horizontal coordinates used to calculate the arcsreturn
stm_arcs
: An STM in form of Xarray.Dataset, with each element in space an arc. Three data variables:stm_points
stm_points
end['phase'] - start['phase']
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