megicparc.functions
.compute_distance_matrix¶
- megicparc.functions.compute_distance_matrix(fwd, gamma=0, theta=0, labels=None)¶
Compute combined distance matrix and sort it.
Parameters¶
- fwdinstance of Forward
The forward solution
- gammafloat in [0, 1]
Weight given to the spatial constraints.
- thetafloat in [0, 1)
Weight give to the anatomical constraints. If None only the cortico-cortical distance is used
- labelslist of Label
Anatomical region used as reference
Returns¶
- sort_distdict
A dictionary containing: sort_dist[‘vals’] : ndarray, shape (n_sources, n_sources-1) Distance matrix, each row sorted in ascending order. sort_dist[‘idx’] : ndarray, shape (n_source, n_sources-1) Indices that would sort the distance matrix