From a2631525313941e53fc7157b9ef406b43851121f Mon Sep 17 00:00:00 2001 From: Badri Vishal Pandey Date: Sun, 25 Oct 2026 02:09:40 +0530 Subject: [PATCH 1/2] BUG: Clear extra points filter when setting info in Coregistration (#14420) --- doc/changes/dev/14420.bugfix.rst | 1 + doc/changes/names.inc | 1 + mne/coreg.py | 1 + mne/tests/test_coreg.py | 5 +++++ 4 files changed, 8 insertions(+) create mode 100644 doc/changes/dev/14420.bugfix.rst diff --git a/doc/changes/dev/14420.bugfix.rst b/doc/changes/dev/14420.bugfix.rst new file mode 100644 index 00000000000..b0381c428fe --- /dev/null +++ b/doc/changes/dev/14420.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() From 7420f66b241935577c63bd30238bb04cd1afbcfa Mon Sep 17 00:00:00 2001 From: Badri Vishal Pandey Date: Sun, 25 Oct 2026 02:16:19 +0530 Subject: [PATCH 2/2] MAINT: Rename changelog snippet to match PR number 14458 --- doc/changes/dev/{14420.bugfix.rst => 14458.bugfix.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/changes/dev/{14420.bugfix.rst => 14458.bugfix.rst} (100%) diff --git a/doc/changes/dev/14420.bugfix.rst b/doc/changes/dev/14458.bugfix.rst similarity index 100% rename from doc/changes/dev/14420.bugfix.rst rename to doc/changes/dev/14458.bugfix.rst