Skip to content

ENH: helper to warn about bad coregistration - #14599

Draft
Mal-1702 wants to merge 4 commits into
mne-tools:mainfrom
Mal-1702:enh-warn
Draft

Mal-1702 wants to merge 4 commits into
mne-tools:mainfrom
Mal-1702:enh-warn

Conversation

@Mal-1702

@Mal-1702 Mal-1702 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6552

What does this implement/fix?

In the issue as it was said that, it should give a warning if distances are above 5mm
so the fix I added is :
built an independent helper function _warn_bad_coregistration with limit=0.005 by default in the function and not calling it in dig_mri_distances and compute_dig_mri_distances in which I chose the median method to work on and also ran tests in
mne/tests/test_surface.py which validates it

Additional information

Usage of Claude AI has been used in this for reviewing the code and understanding the issue in more detail also credits to @TzionaN as I have been taking it as an reference to solve this

Its a draft for now, so it isnt called anywhere, have asked on #6552 for the confirmation for calling it in the desired file

@welcome

welcome Bot commented Nov 25, 2026

Copy link
Copy Markdown

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Warn if distances are bad

1 participant