diff --git a/doc/changes/dev/14458.bugfix.rst b/doc/changes/dev/14458.bugfix.rst new file mode 100644 index 00000000000..b0381c428fe --- /dev/null +++ b/doc/changes/dev/14458.bugfix.rst @@ -0,0 +1 @@ +Clear head shape points omit filter in :meth:`mne.coreg.Coregistration.set_info` when loading a new digitizer recording (:gh:`14420`), by `Badri Vishal Pandey`_. diff --git a/doc/changes/names.inc b/doc/changes/names.inc index 8ff1da6d843..ce61ca6c981 100644 --- a/doc/changes/names.inc +++ b/doc/changes/names.inc @@ -52,6 +52,7 @@ .. _Athish M: https://github.com/athishdresu .. _Austin Hurst: https://github.com/a-hurst .. _Ayushi Satodiya: https://github.com/ayuclan +.. _Badri Vishal Pandey: https://github.com/badrisatyam1-ctrl .. _Baris Talar: https://github.com/baris-talar .. _Basile Pinsard: https://github.com/bpinsard .. _Beige Jerry Jin: https://github.com/BeiGeJin diff --git a/mne/coreg.py b/mne/coreg.py index 8363fb5fea8..3867f63179b 100644 --- a/mne/coreg.py +++ b/mne/coreg.py @@ -1573,6 +1573,7 @@ def set_info(self, info): """ _validate_type(info, (Info, None), "info") self._info = info + self._extra_points_filter = None self._setup_digs() return self diff --git a/mne/tests/test_coreg.py b/mne/tests/test_coreg.py index 6dbc5bd7ba3..0082043840b 100644 --- a/mne/tests/test_coreg.py +++ b/mne/tests/test_coreg.py @@ -532,6 +532,11 @@ def test_coreg_fitting_invariants(): assert len(kept) <= prev_n_kept prev_n_kept = len(kept) + # GH#14420: verify set_info clears omitted points filter + assert coreg._extra_points_filter is not None + coreg.set_info(info) + assert coreg._extra_points_filter is None + # fit_fiducials / fit_icp for _ in range(5): coreg.reset()