Repository navigation
ENH: Add save() to ConductorModel and InverseOperator - #14612
Open
KrBeTect2025 wants to merge 3 commits into
Open
KrBeTect2025 wants to merge 3 commits into
KrBeTect2025 wants to merge 3 commits into
Conversation
KrBeTect2025
requested review from
agramfort,
drammock and
larsoner
as code owners
November 30, 2026 14:15
Contributor
|
|
Author
|
Yess good catch, Fixed both tests to save to a new file |
nordme
approved these changes
Dec 2, 2026
nordme
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me! The Azure Pipeline failures look unrelated.
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 #14609.
What does this implement/fix?
Adds
ConductorModel.save()andInverseOperator.save(), so a BEM solution and an inverse operator can be saved the same way asForwardand most other MNE objects. Both takefname, *, overwrite=False, verbose=None, likeForward.save, and call the existingwrite_bem_solution/write_inverse_operator, so nothing about the file format changes.The existing
test_io_bem(fif and h5) andtest_io_inverse_operatornow also save with the new method and read the file back. Those checks fail onmainand pass with this change.test_bem.pyandminimum_norm/test_inverse.pypass locally (97 passed, 9 skipped), as do pre-commit andtest_docstring_parameters.py.Additional information
AI disclosure: I used Claude Code (Claude Opus 5.5). It wrote the two methods, the test additions, the changelog entry, and a first draft of this description. I chose the issue and reviewed the diff and this text before submitting.