@verbose
def spatio_temporal_dist_connectivity(src, n_times, dist, verbose=None):
 if (src[0]['dist'] is None):
  raise RuntimeError('src must have distances included, consider using\nmne_add_patch_info with --dist argument')
 edges = sparse_block_diag([s['dist'][s['vertno'], :][:, s['vertno']] for s in src])
 edges.data[:] = np.less_equal(edges.data, dist)
 edges = edges.tocsr()
 edges.eliminate_zeros()
 edges = edges.tocoo()
 return _get_connectivity_from_edges(edges, n_times)

@ verbose def spatio_temporal_dist_connectivity ( src , n_times , dist , verbose = None ) : if ( src [ 0 ] [ 'dist' ] is None ) : raise RuntimeError ( 'src must have distances included, consider using\nmne_add_patch_info with --dist argument' ) edges = sparse_block_diag ( [ s [ 'dist' ] [ s [ 'vertno' ] , : ] [ : , s [ 'vertno' ] ] for s in src ] ) edges . data [ : ] = np . less_equal ( edges . data , dist ) edges = edges . tocsr ( ) edges . eliminate_zeros ( ) edges = edges . tocoo ( ) return _get_connectivity_from_edges ( edges , n_times )
compute connectivity from distances in a source space and time instants .