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

Function _check_reference

mne/minimum_norm/inverse.py:887–901  ·  view source on GitHub ↗

Check for EEG ref.

(inst, ch_names=None)

Source from the content-addressed store, hash-verified

885
886
887def _check_reference(inst, ch_names=None):
888 """Check for EEG ref."""
889 info = inst.info
890 if ch_names is not None:
891 picks = [
892 ci for ci, ch_name in enumerate(info["ch_names"]) if ch_name in ch_names
893 ]
894 info = pick_info(info, sel=picks)
895 if _needs_eeg_average_ref_proj(info):
896 raise ValueError(
897 "EEG average reference (using a projector) is mandatory for "
898 "modeling, use the method set_eeg_reference(projection=True)"
899 )
900 if _electrode_types(info) and info.get("custom_ref_applied", False):
901 raise ValueError("Custom EEG reference is not allowed for inverse modeling.")
902
903
904def _subject_from_inverse(inverse_operator):

Callers 12

_apply_inverseFunction · 0.85
apply_inverse_rawFunction · 0.85
estimate_snrFunction · 0.85
mixed_normFunction · 0.85
tf_mixed_normFunction · 0.85
gamma_mapFunction · 0.85
apply_dicsFunction · 0.85
apply_dics_epochsFunction · 0.85
apply_lcmvFunction · 0.85
apply_lcmv_epochsFunction · 0.85
apply_lcmv_rawFunction · 0.85

Calls 3

pick_infoFunction · 0.85
_electrode_typesFunction · 0.85

Tested by

no test coverage detected