Repository navigation
ENH: helper to warn about bad coregistration - #14599
Conversation
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
|
I think it makes sense to use |
|
@larsoner Thanks for the help, I have added it in |
| ) | ||
|
|
||
|
|
||
| def test_warn_bad_coregistration(): |
There was a problem hiding this comment.
I don't think we need the separate test since it's already tested in the report code...
| return dists | ||
|
|
||
|
|
||
| def _warn_bad_coregistration(dists, limits=0.005): # default 5 mm |
There was a problem hiding this comment.
And we don't ever set limits to anything else or use this elsewhere, so we can just simplify and move into report.py directly
|
Thanks for the reviews and tweaks @larsoner will keep these things in mind from here on. |
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_coregistrationwithlimit=0.005by default in the function and not calling it indig_mri_distancesandcompute_dig_mri_distancesin which I chose the median method to work on and also ran tests inmne/tests/test_surface.pywhich validates itAdditional 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
Called in
Report.add_transas @larsoner suggested and performed the test which conveyed the message median 6.9mm on the wrongfsaverage. The warning fires intest_manual_report_3dinmne/report/tests/test_report.py