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

Function _check_stc_src

mne/source_estimate.py:3408–3423  ·  view source on GitHub ↗
(stc, src)

Source from the content-addressed store, hash-verified

3406
3407
3408def _check_stc_src(stc, src):
3409 if stc is not None and src is not None:
3410 _check_subject(
3411 src._subject,
3412 stc.subject,
3413 raise_error=False,
3414 first_kind="source space subject",
3415 second_kind="stc.subject",
3416 )
3417 for s, v, hemi in zip(src, stc.vertices, ("left", "right")):
3418 n_missing = (~np.isin(v, s["vertno"])).sum()
3419 if n_missing:
3420 raise ValueError(
3421 f"{n_missing}/{len(v)} {hemi} hemisphere stc vertices "
3422 "missing from the source space, likely mismatch"
3423 )
3424
3425
3426def _prepare_label_extraction(stc, labels, src, mode, allow_empty, use_sparse):

Callers 2

plot_source_estimatesFunction · 0.85

Calls 2

_check_subjectFunction · 0.85
sumMethod · 0.45

Tested by

no test coverage detected