sarcgraph.sg.SarcGraph._zdisc_to_graph
- SarcGraph._zdisc_to_graph(zdiscs, K=3)[source]
Creates a graph with zdiscs as nodes. Each zdisc is connected to its
Knearest neighbors.- Parameters:
zdiscs (np.array, shape=(N, 3)) – zdiscs information as an array. The first two columns are the x and y location of zdisc centers and the last is the particle id.
K (int, optional) – number of nearest neighbors for each zdisc, by default 3
- Return type:
nx.Graph