-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
FIX: fix topo plot when large channel distance gives rise to invalid values for arcsin #9528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Could this possibly fix/close #8291 too? |
|
Thanks for the clarification @mmagnuski, I was just hoping for a magic fix 😄 |
|
@mmagnuski can you just a what's new entry? thx for the quick reaction to fix this one ! |
|
No problem! what's new entry added, waiting for the CIs. |
|
One CI task (Azure Main Ultraslow) timed out, rest is green. |
| evoked.set_montage(ten_five) | ||
|
|
||
| evoked.plot_topomap(sphere=0.05, res=8) | ||
| plt.close('all') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this is no longer necessary as we have a magic autouse mpl fixture that calls plt.close
Lines 131 to 137 in 2e200aa
| @pytest.fixture(autouse=True) | |
| def close_all(): | |
| """Close all matplotlib plots, regardless of test status.""" | |
| # This adds < 1 µS in local testing, and we have ~2500 tests, so ~2 ms max | |
| import matplotlib.pyplot as plt | |
| yield | |
| plt.close('all') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, good, I just followed what other tests there used (and actually thought about a decorator like that), I can change this in the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am slowly eliminating the ones at the end of functions as I see them. (The ones in the middle of tests are still useful to prevent too many MPL windows from popping up, eating memory, and possibly emitting warnings about 20+ windows.)
|
Thanks @mmagnuski ! |
|
Thanks @larsoner @agramfort! 🚀 |
* upstream/main: MAINT: Avoid VTK 9.0.2 [skip actions] [skip circle] (mne-tools#9530) MRG: Test get_montage on fNIRS data (mne-tools#9524) FIX: fix topo plot when large channel distance gives rise to invalid values for arcsin (mne-tools#9528) use Polynomial.fit for poly fitting (mne-tools#9514)
* upstream/main: MRG, ENH: Abstracted volume registration again (mne-tools#9521) MAINT: Avoid VTK 9.0.2 [skip actions] [skip circle] (mne-tools#9530) MRG: Test get_montage on fNIRS data (mne-tools#9524) FIX: fix topo plot when large channel distance gives rise to invalid values for arcsin (mne-tools#9528) use Polynomial.fit for poly fitting (mne-tools#9514)
Fixes #9526 and #9511. I'll add the example posted by @agramfort as a test later.