MCPcopy
hub / github.com/mne-tools/mne-python / query

Method query

mne/surface.py:607–615  ·  view source on GitHub ↗
(self, rr)

Source from the content-addressed store, hash-verified

605 self._xhs = xhs
606
607 def query(self, rr):
608 nearest = list()
609 dists = list()
610 for r in rr:
611 d = cdist(r[np.newaxis, :], self._xhs)
612 idx = np.argmin(d)
613 nearest.append(idx)
614 dists.append(d[0, idx])
615 return np.array(dists), np.array(nearest)
616
617
618def _compute_nearest(xhs, rr, method="BallTree", return_dists=False):

Callers 11

_decimate_pointsFunction · 0.45
_update_paramsMethod · 0.45
_compute_nearestFunction · 0.45
queryMethod · 0.45
_keys_to_idxMethod · 0.45
_filter_source_spacesFunction · 0.45
_get_nearestFunction · 0.45
_cut_coords_to_idxFunction · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected