Repository navigation
BUG: Clear extra points filter when setting info in Coregistration (#14420) - #14458
Open
badrisatyam1-ctrl wants to merge 4 commits into
Open
badrisatyam1-ctrl wants to merge 4 commits into
badrisatyam1-ctrl wants to merge 4 commits into
Conversation
badrisatyam1-ctrl
requested review from
agramfort,
drammock and
larsoner
as code owners
October 24, 2026 20:40
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
Member
|
Thank you @badrisatyam1-ctrl for your time. This is already added in #14412, see this commit |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
Fixes #14420.
What does this implement/fix?
When using
Coregistration.omit_head_shape_points(), an omission mask is saved inself._extra_points_filter. When loading a new digitizer file or callingCoregistration.set_info(new_info)with a different number of head shape points, this stale filter was retained, causing anIndexError: boolean index did not match indexed array along axis 0during subsequent fitting or distance calculation.This PR resets
self._extra_points_filter = NoneinsideCoregistration.set_info(), clears the stale mask when digitizer info changes, and adds a regression assertion intest_coreg_fitting_invariants().Additional information
AI assistance disclosure: developed with Antigravity using Gemini 3.8 Flash to trace the execution path and draft the regression assertion. The fix was tested locally against issue #14420.